Skip to content

Instantly share code, notes, and snippets.

View falkirks's full-sized avatar

noa falkirks

View GitHub Profile
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@nikic
nikic / portAlternativeTags.php
Created September 12, 2014 17:41
Tool for porting alternative PHP tags to <?php, <?= and ?>
<?php
/*
* Note: This script will directly modify the .php files in the given directory.
* It is assumed that the code is under version control, so you can easily review
* the changes using `git diff` or similar.
*/
function usageError() {
die("Usage: php -d asp_tags=1 portAlternativeTags.php dir/\n");
@kylehowells
kylehowells / KHEventQueue.h
Created August 4, 2014 19:34
Event queue I wrote to make a block run after all conditions have been met. For example, removing a complex loading animation after the animation has finished and the data has loaded.
//
// KHEventQueue.h
//
// Created by Kyle Howells on 04/08/2014.
// Copyright (c) 2014 Kyle Howells. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^KHEventBlock)(void);
@matthieubulte
matthieubulte / gist:27f0cb9f3d803e2632e0
Created June 11, 2014 06:41
cons/car/cdr in swift
func cdr<L, R>(p: () -> (L,R)) -> R {
let (l,r) = p()
return r
}
func car<L, R>(p: () -> (L,R)) -> L {
let (l,r) = p()
return l
}
@shoghicp
shoghicp / list.md
Last active August 29, 2015 14:00
Tech things done by Mojang for Minecraft: Pocket Edition

These are a few things requested to Mojang, or the developer themselves, or we were told that they added this.

Done / Confirmed

Thing done Version Notes
Play -> Edit -> External menu 0.7.4
Fix protocol inconsistencies MCPE-6865 0.9.0
@rtt
rtt / tinder-api-documentation.md
Last active June 15, 2025 18:01
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@vertexclique
vertexclique / cracking.md
Last active May 14, 2025 16:51
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@willurd
willurd / web-servers.md
Last active June 30, 2025 08:23
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000