Skip to content

Instantly share code, notes, and snippets.

View davidvasandani's full-sized avatar

David Vasandani davidvasandani

View GitHub Profile
@osterman
osterman / server.js
Created November 14, 2018 22:14
Docker Registry Authentication Proxy
var http = require('http'),
https = require('https'),
buffer = require('buffer'),
httpProxy = require('http-proxy');
var tokens = {},
basicAuth = new Buffer(process.env.BASIC_AUTH).toString('base64');
//
@epcim
epcim / salt-trends.sh
Last active May 20, 2019 21:26
salt states trends jq yq
@gretel
gretel / wait_unattended_upgrades.sh
Last active April 4, 2019 08:55
`vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully
#!/usr/bin/env bash
# https://gist.github.com/gretel/34008d667a8a243a9682e5207619ad95
# 2016 tom hensel <github@jitter.eu>
# `vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully
# in `Vagrantfile`:
# config.vm.provision 'Wait for unattended-upgrades', type: 'shell', path: './provisioning/wait_unattended_upgrades.sh', args: %w( dpkg apt unattended-upgrade )
#
function wait_procnames {
while true; do
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@anishavasandani
anishavasandani / pusher.txt
Last active July 30, 2018 22:19
Pusher Logs
1. http://pusher-diagnostics.herokuapp.com/ -- ** All Tests Passed **
{
"summary": {
"failed": 0,
"passed": 15,
"total": 15,
"runtime": 5117
},
"results": {
@alexandrem
alexandrem / init.coffee
Created May 8, 2015 02:22
Atom Editor - Default ansible syntax for .yml
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015 05:21
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@czunker
czunker / README.md
Last active August 29, 2015 14:11 — forked from steinim/human_log.py
This is special variant of the human_log.py, to just get output when something changed.
anonymous
anonymous / gulpfile.js
Created August 2, 2014 12:13
'use strict';
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var exec = require('child_process').exec;
var run = function(command, done) {
exec(command, function(error) {
if (error) {
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 24, 2024 09:21
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)