Skip to content

Instantly share code, notes, and snippets.

View panduroab's full-sized avatar

Abraham panduroab

  • SalesLoft
  • Guadalajara
View GitHub Profile
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--timeout",
@panduroab
panduroab / gist:22af9ec926c26ce79a6d0507604a41e0
Last active June 3, 2020 15:53
Keycloak OpenId-Connect Auth endpoint
//Configure the Keycloak client app as: Access Type public and Implicit Flow Enabled as true
let authParams = {
client_id: 'electron',
redirect_uri: 'http://localhost',
response_type: 'token',
scope: 'openid',
nonce: 'random_string' //Random string chain
}
let url = `${authConfig["auth-server-url"]}realms/${authConfig['realm']}/protocol/openid-connect/auth?${querystring.encode(authParams)}`;
const Model = require("./model");
let agg = model.aggregate();
//match the results
agg.match({
rated: "R"
});
//Make the projection
agg.project({
import React, { Component } from 'react';
class Display extends Component {
render() {
return <div>{this.props.number}</div>;
}
}
class App extends Component {

#Docker Cheatsheet

####Search Docker images You can search Images with this command

$ docker search [image name]

mongodb for example:

$ docker search --filter=stars=1 mongo

Access to the server

ssh root@VPS_PUBLIC_IP

Create a new User

adduser usrexample
@panduroab
panduroab / webpack.config.js
Created December 3, 2015 20:37
Webpack config file for webpack@1.12.9, babel-loader@6.2.0, babel-preset-es2015@6.1.18, babel-preset-react@6.1.18 and eslint@1.9.0
module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: 'bundle.js',
publicPath: '/'
},
devServer: {
inline: true,
contentBase: './dist'
@panduroab
panduroab / Install-and-config-strong-pm.md
Last active September 10, 2017 02:32
Deploy a Loopback API with strong-pm in Ubuntu

Install Node.js on Ubuntu 14.04

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version
sudo apt-get install -y build-essential

Install strong-pm