Skip to content

Instantly share code, notes, and snippets.

@eliasdorneles
eliasdorneles / repl-voc.sh
Last active February 28, 2018 00:53
A hack to simulate a REPL for VOC
#!/bin/bash
# For arrow-keys history and other cmdline goodies, install rlwrap and replace
# the first line by: #!/usr/bin/rlwrap bash
# This is a hack to simulate a REPL for VOC (http://pybee.org/voc)
#
# Behind the scenes, every time you try a new expression it appends it to a temporary
# file, recompiles it and re-runs it, omitting the previous output.
#
# This has the caveat that if some expression you enter raises an exception,
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@gurglet
gurglet / git-post-checkout.sh
Created February 9, 2012 13:55
Git post checkout hook that reminds you of South migration changes when changing branches. Can be useful when you are when you are testing out a branch from someone else that requires migrations. Put the file in .git/hooks/post-checkout
#!/bin/bash
# Git post checkout hook.
# Reminds you of South migration changes when switching branches.
# Can be useful when you are when you are testing out a branch from
# someone else that requires migrations.
# Put the file in .git/hooks/post-checkout
PREVIOUS_HEAD=$1
NEW_HEAD=$2