Skip to content

Instantly share code, notes, and snippets.

View geekgonecrazy's full-sized avatar
🚀
Building and Launching!

Aaron Ogle geekgonecrazy

🚀
Building and Launching!
View GitHub Profile
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@azat-co
azat-co / express.js
Last active August 19, 2018 03:30
Tutorial: REST API with Node.js and MongoDB using Mongoskin and Express.js
var express = require('express')
, mongoskin = require('mongoskin')
var app = express()
app.use(express.bodyParser())
var db = mongoskin.db('localhost:27017/test', {safe:true});
app.param('collectionName', function(req, res, next, collectionName){
req.collection = db.collection(collectionName)
@Mantish
Mantish / AuthController.js
Last active December 21, 2015 21:09 — forked from theangryangel/AuthController.js
Sails.js (v0.9.3) authentication using Passportmiddleware
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/
@evandandrea
evandandrea / .travis.sh
Last active January 23, 2021 14:56
Automatically publish to the snap store from Travis
#!/bin/sh -e
if [ -z "$SNAPCRAFT_SECRET" ]; then
# Run `sh seed.sh` on your local machine so SNAPCRAFT_SECRET is set.
exit 0
fi
mkdir -p ".encrypted"
if [ ! -e ".encrypted/snapcraft.cfg.enc" ]; then
echo "Seeding a new macaroon."
@kevincolten
kevincolten / migration.md
Last active November 1, 2016 04:22
Rocket.Chat DB Migration from Heroku/mLab to DigitalOcean

Rocket.Chat DB Migration from Heroku/mLab to DigitalOcean

  1. Put app in maintenance mode on Heroku
  2. Download backup of database in mLab
  3. Copy database to DO Droplet scp backup.tgz [email protected]:~/
  4. SSH into droplet and unzip the file tar zxvf backup.tgz
  5. Inside the unzipped directory, rename the database directory to parties/ mv backup/database-name/ backup/parties
@Deepakkothandan
Deepakkothandan / rocketchat.py
Created February 15, 2017 10:30
Rocketchat callback plugin for Ansible
# (C) 2016, Deepak Kothandan
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
@rodrigok
rodrigok / a.sh
Last active June 9, 2017 20:09
Debug Rocket.Chat demo container
# Terminal 1
docker exec -it CONTAINER_ID /bin/bash
npm install node-inspector
kill -s USR1 PROCESS_ID
node_modules/node-inspector/bin/inspector.js --web-port=9000
# Terminal 2
docker exec -it CONTAINER_ID /bin/bash
curl -O https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tar.gz
tar -xvzf ngrok-stable-linux-amd64.tar.gz
@mrsimpson
mrsimpson / launch.json
Last active April 12, 2018 22:54
VSCode launch configuration for Assistify and Rocket.Chat - see https://github.com/Microsoft/vscode-node-debug/issues/179
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to meteor debug",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"restart": false,
const fs = require('fs');
const { exec } = require('child_process');
const file = fs.readFileSync('replicasets4.txt').toString();
// const file = fs.readFileSync('pods.txt').toString();
(async () => {
const lines = file.split('\n');
const total = lines.length;