Skip to content

Instantly share code, notes, and snippets.

@andyfoster
andyfoster / it-ebooks.md
Created March 25, 2021 04:30 — forked from baiwfg2/it-ebooks.md
Download ebooks as you want
@andyfoster
andyfoster / osx-for-hackers.sh
Created May 16, 2020 00:34 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@andyfoster
andyfoster / setting-up-babel-nodemon.md
Last active September 13, 2018 09:57 — forked from sam-artuso/setting-up-babel-nodemon.md
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@andyfoster
andyfoster / mac-apps.md
Created September 29, 2017 17:12 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@andyfoster
andyfoster / CronSchedule.php
Created October 10, 2016 03:20 — forked from m4tthumphrey/CronSchedule.php
CronSchedule.php - Allows one to parse a cron expression into human readable text.
<?php
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
*
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.
<?php
/*
*
* Wrapper script for hitting Glip Webhooks
*
* @usage:
* Include this file and call like so:
*
* require_once("GlipPost.php");
<?php
// Check this request has a GitLab header
function checkHeader($gitlab_header) {
if (!isset($gitlab_header)) {
throw new Exception("Can't be accessed directly.");
}
}
try { checkHeader($_SERVER['HTTP_X_GITLAB_EVENT']); }
@andyfoster
andyfoster / Blackjack.js
Created June 12, 2016 22:29 — forked from jonarnaldo/Blackjack
Javascript Blackjack
/*Object Oriented Blackjack
A Game has: Players
Dealer
Deck
A Player / Dealer has: Score
Cards
A Score has: Game Logic
@andyfoster
andyfoster / iterm2.md
Created April 7, 2016 02:21
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [