Skip to content

Instantly share code, notes, and snippets.

View robphoenix's full-sized avatar
🤘
Design Systems 4 lyfe

Rob Phoenix robphoenix

🤘
Design Systems 4 lyfe
View GitHub Profile
@bsag
bsag / .vimrc
Last active October 20, 2018 21:13
My vim and tmux configs, using airline (as discussed [here](http://www.rousette.org.uk/blog/archives/tinkering-with-vim/). The Powerline theme is pretty much the default (may be a bit old now) and I just commented out a few plugins I didn't need. I use the patched Sauce Code Pro for my powerline/airline font.
" Set up Vundle to manage plugins
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'
@blocke
blocke / gist:6812723
Created October 3, 2013 16:28
Mockup of what a using a Cisco module for Ansible might look like:
---
- hosts: myciscoswitch
connection: cisco
user: adminuser
tasks:
- name: raw template (not idempotent)
cisco: action=raw src=foo.j2
@maxcap
maxcap / Eloquent Javascript Exercise Answers
Last active February 27, 2019 13:33
Eloquent Javascript Book: Exercise Answers
/*
These are my attempts at the exercises in the book Eloquent Javascript
http://eloquentjavascript.net
*/
@PHLAK
PHLAK / build.json
Created November 13, 2014 21:12
Packer QEMU / KVM example.
{
"variables": {
"ssh_user": "root",
"ssh_pass": "T@c0_Bu3n0"
},
"builders": [
{
@jonathanpmartins
jonathanpmartins / install-libsodium.sh
Last active July 28, 2019 03:14
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
#!/bin/bash
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
@pauldambra
pauldambra / checkout-kata.exs
Created December 29, 2015 15:33
the checkout kata in elixir
defmodule Checkout do
defstruct [
basket: %{A: 0, B: 0, C: 0, D: 0}
]
def scan(checkout, code) do
new_value = checkout.basket[code] + 1
%{checkout | basket: Map.put(checkout.basket, code, new_value)}
end
s = status --short --branch --ignore-submodules=untracked
find = log --pretty=\"format:%Cgreen%H\n%s\n\n%b\" --name-status --grep
amend = commit --amend --no-edit
undo = reset HEAD~
upload = "!git push rakyll $(git rev-parse --abbrev-ref HEAD)"
prune = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
delete = branch -D
pr = "!git fetch origin pull/$1/head:pr$1"
sync = "!git pull -q -r origin master"
@ivanbatic
ivanbatic / typescript-async-await-demo.ts
Last active January 12, 2021 21:55
Typescript async/await demo
"use strict";
class Cheese {
private state = "hard";
public async melt() {
console.log("Melting...");
return new Promise((resolve) => {
setTimeout(() => {
this.state = "melted";
@onpubcom
onpubcom / onpubcom_array_date_sort.js
Created February 8, 2012 20:15
How to Sort an Array of Dates with JavaScript
<script type="text/javascript">
// First let's create an array of JavaScript Date
// objects.
// More info about the Date class:
// http://w3schools.com/js/js_obj_date.asp
var dates = [
new Date(2010, 4, 10, 10, 07, 16),
new Date(2010, 4, 8, 9, 16, 09),
new Date(2010, 3, 30, 0, 15, 49),
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content