Skip to content

Instantly share code, notes, and snippets.

View philihp's full-sized avatar
👨‍💻
Turning caffeine into code

‮Philihp Busby philihp

👨‍💻
Turning caffeine into code
View GitHub Profile
@GitsMcGee
GitsMcGee / circle.yml
Created December 14, 2014 22:42
CircleCI config for Play 2.3 and Elastic Beanstalk
machine:
environment:
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'
java:
version: oraclejdk8
python:
version: 2.7.6
services:
- docker
@kennwhite
kennwhite / amazon_linux_letsencrypt_installer.sh
Last active May 25, 2017 18:09
Amazon Linux 2015.09 for LetsEncrypt beta installer
#!/bin/bash
#
# Amazon Linux (2015.09.1 x86_64 minimal HVM EBS: ami-fbb9c991)
#
# See: https://gist.github.com/kennwhite/aa74c164bcdf092a7a10 for more background & notes
# The use case is a standalone build on stock distro, then ssh push cert/keys to
# public-facing web server (nginx, etc). IMHO, there are too many dev packages
# required for Internet-exposed production boxes, but your use case may vary.
@sprice
sprice / airbnb_core_values.md
Last active September 23, 2019 01:58
Airbnb Core Values

source: https://vimeo.com/59958555

  1. Host
  2. Champion the Mission
  3. Every Frame Matters
  4. Be a cereal entrepreneur [1]
  5. Simplify
  6. Embrace the adventure

[1] Airbnb bootstrapped themselves by selling Obama and McCain branded cereal at the 2008 Democratic National Convention. https://www.airbnb.ca/obamaos

@stsdmchv
stsdmchv / visualstudio2019Key.txt
Created June 12, 2020 08:16
Visual Studio 2019 Product Key
Visual Studio 2019 Product Key
Visual Studio 2019 Enterprise
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
Visual Studio 2019 Professional
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y
[Please Star this gist]
@amatiasq
amatiasq / Handlebars- Backbone.js
Created February 5, 2013 00:06
This allow Handlebars to look up Backbone Model's attributes: {{ user.address.street }} If user is a Backbone Model this will become user.get("address").street And if user.get("adress") is also a Backbone Model this will be produced: user.get("address").get("street")
Handlebars.JavaScriptCompiler.prototype.nameLookup = function(parent, name, type) {
var result = '(' + parent + ' instanceof Backbone.Model ? ' + parent + '.get("' + name + '") : ' + parent;
if (/^[0-9]+$/.test(name)) {
return result + "[" + name + "])";
} else if (Handlebars.JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
return result + "." + name + ')';
} else {
return result + "['" + name + "'])";
}
};
@neftaly
neftaly / curry.js
Last active April 10, 2022 18:47
ES6 Auto-curry
const curry = (fn, ...oldArgs) => (...newArgs) => {
const args = [...oldArgs, ...newArgs];
return (args.length < fn.length) ? curry(fn, ...args) : fn(...args);
};
@drewfradette
drewfradette / gist:2617991
Created May 6, 2012 05:41
CodeCat - syntax highlighting for cat
#!/bin/bash
# Filename catc
# Description print files to stdout with syntax highlighting (using python-pygments)
# Author Drew Fradette <http://www.github.com/drewfradette>
# Version 0.6
# Last Updated 2012-09-26
# Usage catc file.sh
# bash_version 4.2.10(1)-release
#######################################################
@philihp
philihp / ec2-airflow.md
Last active April 14, 2023 00:34
How to get Apache Airflow running on a bare AWS EC2 node

How to get Apache Airflow running on a bare AWS EC2 node

Amazon Managed Workflows for Apache Airflow (AWS MWAA) is prohibitively expensive for someone tinkering around on a personal account, and unprepared to pay a few hundred dollars a month at a minimum for their smallest environment. Here are the commands I used to get it running on Ubuntu 20.

Prepare the box

sudo apt-get update
@nrollr
nrollr / Node_AWS_Linux.md
Last active May 7, 2023 14:18
Install Node.js on Amazon Linux (EC2)

Installing Node.js on Amazon Linux AMI

The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes

For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh

@srebalaji
srebalaji / git-hard-delete
Last active October 10, 2023 13:10
Examples of git custom command
#!/bin/sh
branch=$1
if [ ! -z "$1" ]
then
git branch -D $branch
git push -d origin $branch
else
echo "Branch name is not specified"