open-index/open-npm huggingface dataset:
npm package: @sgbj/angular-gist
Description: Embed GitHub Gists in your Angular apps without an iframe.
Author: sgbj
Latest version: 0.3.0

# angular-gist

Embed GitHub Gists in your Angular apps without an iframe.

## Installation

To install this library, run:

```bash
$ npm install @sgbj/angular-gist --save
```

## Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

```bash
$ npm install @sgbj/angular-gist
```

and then from your Angular `AppModule`:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { GistModule } from '@sgbj/angular-gist';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    GistModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Once your library is imported, you can use its components, directives and pipes in your Angular application:

```ts
@Component({
  selector: 'app',
  template: `<gh-gist src="https://gist.github.com/sgbj/95ab8e2e77150318e7bd25b8d00a3248.js"></gh-gist>`
})
class AppComponent {
}
```

## Development

To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

```bash
$ npm run build
```

To lint all `*.ts` files:

```bash
$ npm run lint
```

## License

MIT © [sgbj](mailto:scott@batary.io)
npm package: @sgbj/angular-prism
Description: Use the Prism syntax highlighter in your Angular applications.
Author: sgbj
Latest version: 0.2.1

# [@sgbj/angular-prism](https://www.npmjs.com/package/@sgbj/angular-prism)

Use the Prism syntax highlighter in your Angular applications.

## Installation

To install this library, run:

```bash
$ npm install @sgbj/angular-prism --save
```

## Consuming your library

Once you have published your library to npm, you can import your library in any Angular application by running:

```bash
$ npm install @sgbj/angular-prism
```

and then from your Angular `AppModule`:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { PrismModule } from '@sgbj/angular-prism';

import 'prismjs/prism';
import 'prismjs/components/prism-typescript';
import 'prismjs/components/prism-scss';
import 'prismjs/components/prism-markup';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    PrismModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

and in your style file:

```scss
@import '~prismjs/themes/prism';
```

Once your library is imported, you can use its components, directives and pipes in your Angular application:

```xml
<!-- You can now use your library component in app.component.html -->
<prism language="typescript">console.log('Hello world!');</prism>
```

or

```xml
<!-- You can now use your library component in app.component.html -->
<prism language="typescript" [code]="code"></prism>
```

[View demo.](https://stackblitz.com/edit/angular-p5pqex)

## Development

To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

```bash
$ npm run build
```

To lint all `*.ts` files:

```bash
$ npm run lint
```

## License

MIT © [sgbj](mailto:scott@batary.io)
npm package: @sgbtz/node-redsys-api
Description: Node.js Redsys api implementation with new the key-hashed message authentication code (HMAC) SHA256 for the virtual payment gateway integration. This is a node.js port of the PHP API provided by [Redsys](http://www.redsys.es/)
Author: Santi Pérez
Latest version: 0.0.5

# node-redsys-api

Node.js Redsys api implementation with new the key-hashed message authentication code (HMAC) SHA256 for the virtual payment gateway integration. This is a node.js port of the PHP API provided by [Redsys](http://www.redsys.es/)

## Installation

	npm install node-redsys-api --save
	
## Examples

### Obtain signature and merchant parameters

`````
const Redsys = require('node-redsys-api').Redsys;

function createPayment(description, total, titular, orderId, paymentId) {
  const redsys = new Redsys();
  const mParams = {
    DS_MERCHANT_AMOUNT: total,
    DS_MERCHANT_ORDER: paymentId,
    DS_MERCHANT_MERCHANTCODE: TPVConfig.fucCode,
    DS_MERCHANT_CURRENCY: TPVConfig.currency,
    DS_MERCHANT_TRANSACTIONTYPE: TPVConfig.transaction_type,
    DS_MERCHANT_TERMINAL: TPVConfig.terminal,
    DS_MERCHANT_MERCHANTURL: `${baseDomain + TPVConfig.redirect_urls.callbackBasePath}/${orderId}`,
    DS_MERCHANT_URLOK: `${baseDomain + TPVConfig.redirectPaths.OK}&id=${orderId}`,
    DS_MERCHANT_URLKO: `${baseDomain + TPVConfig.redirectPaths.KO}&id=${orderId}`,
  };

  return { signature: redsys.createMerchantSignature(TPVConfig.secret, mParams), merchantParameters: redsys.createMerchantParameters(mParams), raw: mParams };
}
`````

### Process TPV callback

`````
const merchantParams = response.Ds_MerchantParameters || response.DS_MERCHANTPARAMETERS;
const signature = response.Ds_Signature || response.DS_SIGNATURE;

const merchantParamsDecoded = redsys.decodeMerchantParameters(merchantParams);
const merchantSignatureNotif = redsys.createMerchantSignatureNotif(TPVConfig.secret, merchantParams);
const dsResponse = parseInt(merchantParamsDecoded.Ds_Response || merchantParamsDecoded.DS_RESPONSE, 10);

if (redsys.merchantSignatureIsValid(signature, merchantSignatureNotif) && dsResponse > -1 && dsResponse < 100) {
/* TPV payment is OK;
... */
} else {
/* 'TPV payment is KO;
... */
}
`````

## Tests
	
	npm run test
	
## Alternative implementations

You can download [Java, PHP, .NET implementations](http://www.redsys.es/#descargas)

## Authors

	Santi Pérez

## License

	MIT
npm package: @sgbtz/ttlock-api
Description: TTLock API
Latest version: 0.0.22

# TTLock API

## Installation

- Run ```npm install``` after cloning the repository
- Run ```npm run build``` to build this package
- Install the package from your another project, run ```npm i <path-to-this-package-folder>```

## Usage

- Create Client

```
import { createClient } from 'ttlock-api'

const client = createClient({
  baseUrl: '',
  clientId: '',
  clientSecret: ''
})
```

- Use The APIs, one for example

```
client.lock.init({
  accessToken: '',
  date: 0,
  lockData: ''
}).then(response => {

  // Do something after getting the response
  
})
```

- You can also import the types when you need to

```
import { UserType } from 'ttlock-api'
```