Skip to content

Instantly share code, notes, and snippets.

@iangreenleaf
iangreenleaf / yaml.vim
Created March 15, 2011 17:38
Dumb-smart indentation for Yaml
" Vim indent file
" Language: Yaml
" Author: Ian Young
" Get it bundled for pathogen: https://github.com/avakhov/vim-yaml
if exists("b:did_indent")
finish
endif
"runtime! indent/ruby.vim
"unlet! b:did_indent
@mtigas
mtigas / gist:952344
Last active June 20, 2024 11:22
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

(function(a,b){function O(a){for(var b=0;b<J.bundles.length;b++)for(var c in J.bundles[b])if(c!=a&&v(J.bundles[b][c],a)>-1)return c}function N(){a.using=m,a.provide=n,a.define=o,a.loadrunner=p;return M}function L(a){var b,c;for(var d=0,e;e=J.matchers[d];d++){var f=e[0],g=e[1];if(b=a.match(f))return g(a)}throw new Error(a+" was not recognised by loader")}function K(a,b){var c=[];for(var d=0,e;e=a[d];d++)typeof e=="string"&&(e=L(e)),u(e)&&(e=new C(K(e,b),b)),c.push(e);return c}function J(){var a=t(arguments),b,c;typeof a[a.length-1]=="function"&&(b=a.pop()),typeof a[a.length-1]=="boolean"&&(c=a.pop());var d=new B(K(a,c),c);b&&d.then(b);return d}function I(){var a=t(arguments),b=[],c,d;typeof a[0]=="string"&&(c=a.shift()),u(a[0])&&(b=a.shift()),d=a.shift();return E(c,function(a){function f(){var e=H(t(b),c),f;typeof d=="function"?f=d.apply(c,e):f=d,typeof f=="undefined"&&(f=c.exports),a(f)}var c=this,e=[];for(var g=0,h=b.length;g<h;g++){var i=b[g];v(["require","exports"],i)==-1&&e.push(G(i,c))}e.length>0?J.apply
@jcleveley-zz
jcleveley-zz / 1-developer.md
Last active September 27, 2015 22:48
Job Requirements

Developer

Context

BBC News is one of the most popular sites in the UK and is trusted worldwide to deliver quality journalism across multiple devices.

Since the launch of the new responsive News site for Mobile, which redefined what's possible with Responsive Web Design, we are now focussed on rolling this approach out to tablet and desktop and across the 30 languages the BBC produces news in. You will be helping to deliver some of the only unbiased journalism available in some parts of the world.

We're based in the centre of London in Broadcasting House, a brand new building which provides a great working environment and houses the largest News Room in Europe. You will be working right next to journalists giving you direct feedback from users.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@sperelson
sperelson / ServeMixup.php
Created October 12, 2012 15:58
Mixup PHP curl routines with memcache
<?php
// Copyright Stephen Perelson
//
// Example PHP script to get a banner from http://mixup.hapnic.com
// Adds a 1 minute cache of the banner using Memcache
// Untested code
//
// Mixup is a cross-Promotion Linksharing service for Mxit web apps
class ServeMixup {
#!/usr/bin/env sh
cp ~/Library/Application\ Support/Google/Chrome/Default/History /tmp/chrome-history
sqlite3 /tmp/chrome-history "SELECT url FROM urls"
@datagrok
datagrok / git-serve.md
Last active April 21, 2023 07:33
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
@Integralist
Integralist / Ruby Lambdas.md
Last active August 8, 2023 05:10
Ruby lambdas

Lambda: standard

# Creating a lambda
l = lambda { |name| "Hi #{name}!" }

# Executing the lambda
l.call("foo") # => Hi foo!
  1. Login to the instance you want the access credentials for
  2. run curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
  3. Get the name of the role returned by this endpoint, and append it to the end: curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME/
  4. The response will include the access key, security key and session token