This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
# options: | |
# :exclude => [keys] - keys need to be symbols | |
def to_ostruct_recursive(options = {}) | |
convert_to_ostruct_recursive(self, options) | |
end | |
private | |
def convert_to_ostruct_recursive(obj, options) | |
result = obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -f .env ]]; then | |
eval "$(awk '/^[A-Z]/ { print "export " $0 }' .env)" | |
if [[ $# -gt 0 ]]; then | |
"$@" | |
elif [[ -z $PS2 ]]; then | |
$SHELL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'roda', '2.5.0' | |
gem 'wedge', github: 'wedge/wedgeio' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gitlab 5.1: https://github.com/gitlabhq/gitlabhq/blob/5-1-stable/doc/install/installation.md | |
# Set up an AWS EC2 Ubuntu 12.04 LTS Server. | |
# Use ap-southeast-1b: spot pricing is smoother | |
# Log in as ubuntu@ | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
# Install the required packages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://api.graph.cool/simple/v1/cixos23120m0n0173veiiwrjr', { | |
method: 'post', | |
mode: 'cors', | |
headers: new Headers({'content-type': 'application/json'}), | |
body: JSON.stringify({ | |
operationName: null, | |
query: `{ | |
Movie(id: "cixos5gtq0ogi0126tvekxo27") { | |
id | |
title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"before": [ | |
"<leader>", | |
"u" | |
], | |
"after": [], | |
"commands": [ | |
{ | |
"command": "redo", | |
"args": [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import m from 'mithril' | |
import User from '../models/User' | |
const Container = '.p-10.bg-pri' | |
const UserListItem = { | |
view({ attrs: { user } }) { | |
return ( | |
<div class="user-list"> | |
{user.firstName} {user.lastName} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import compat from 'preact/compat' | |
export * from 'preact/compat'; | |
export default compat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import compat from 'preact/compat' | |
export * from 'preact/compat'; | |
export default compat; |