# $LOCAL_IP: 'localhost' or machine from local network
# $LOCAL_PORT: open port on local machine
# $REMOTE_IP: remote localhost or IP from remote network
# $REMOTE_PORT: open port on remote site
# Forward Tunnel: map port from remote machine/network on local machine
ssh -L $LOCAL_PORT:$REMOTE_IP:$REMOTE_PORT $USER@$SERVER
# Reverse Tunnel: make local port accessable to remote machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SCREENCAST | |
# USER SETTINGS | |
OUTPUT="$(xdg-user-dir VIDEOS)/Screencast" | |
WAITSEC=3 | |
# VARIABLES | |
SIZE="1366x768" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fbGraph = require('fbgraph'); | |
var FACEBOOK_APP_ID = process.env.FACEBOOK_APP_ID; | |
var FACEBOOK_APP_SECRET = process.env.FACEBOOK_APP_SECRET; | |
function validateTokenAndGetProfile(token, cb) { | |
fbGraph.setAccessToken(token); | |
fbGraph.setAppSecret(FACEBOOK_APP_SECRET); | |
fbGraph.get('/me?fields=id,email,name,gender,bio,picture.type(large)', function(err, result) { | |
if (err) return cb(new Error(err.message)); | |
cb(null, result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.writeFile('/tmp/a.txt', 'data', function(err, result) => { | |
fs.writeFile('/tmp/b.txt', 'data', function(err, result) => { | |
fs.writeFile('/tmp/c.txt', 'data', function(err, result) => { | |
fs.writeFile('/tmp/d.txt', 'data', function(err, result) => { | |
console.log('exito!'); | |
}); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
background: red; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const auth0 = require('auth0-js'); | |
const webAuth = new auth0.WebAuth({ | |
domain: '<YOUR_DOMAIN>', | |
clientID: '<YOUR_CLIENT_ID>', | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# supervisord This scripts turns supervisord on | |
# | |
# Author: Mike McGrath <[email protected]> (based off yumupdatesd) | |
# Jason Koppe <[email protected]> adjusted to read sysconfig, | |
# use supervisord tools to start/stop, conditionally wait | |
# for child processes to shutdown, and startup later | |
# Mikhail Mingalev <[email protected]> Merged | |
# redhat-init-jkoppe and redhat-sysconfig-jkoppe, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Try to determine how much RAM is currently being used per program. | |
# Note per _program_, not per process. So for example this script | |
# will report RAM used by all httpd process together. In detail it reports: | |
# sum(private RAM for program processes) + sum(Shared RAM for program processes) | |
# The shared RAM is problematic to calculate, and this script automatically | |
# selects the most accurate method available for your kernel. | |
# Licence: LGPLv2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download and install NVIDIA-Linux-x86_64-390.48.run | |
2. enable multilib repository | |
2. install lib32-libx11 lib32-glibc lib32-glib2 |