⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# Block Facebook | |
127.0.0.1 www.facebook.com | |
127.0.0.1 facebook.com | |
127.0.0.1 static.ak.fbcdn.net | |
127.0.0.1 www.static.ak.fbcdn.net | |
127.0.0.1 login.facebook.com | |
127.0.0.1 www.login.facebook.com | |
127.0.0.1 fbcdn.net | |
127.0.0.1 www.fbcdn.net | |
127.0.0.1 fbcdn.com |
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 | |
# RunKeeper data to PostGIS | |
# ========================= | |
# 1. Download your RunKeeper data from http://runkeeper.com/exportDataForm | |
# 2. Extract the zip file and cd into the extracted folder | |
# 3. Run this script, adapting the config parameters to your setup | |
# Note: the database must be PostGIS enabled | |
# | |
# You may need to change the way psql is called depending on your Postgres |
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 | |
# Source: https://gist.github.com/ryin/3106801 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.1 |
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
license, chosen_word, guesses, scaffold, man, guesses_left = 'https://opensource.org/licenses/MIT', ''.join(filter(str.isalpha, __import__('random').choice(open('/usr/share/dict/words').readlines()).upper())), set(), '|======\n| |\n| {3} {0} {5}\n| {2}{1}{4}\n| {6} {7}\n| {8} {9}\n|', list('OT-\\-//\\||'), 10 | |
while not all(letter in guesses for letter in chosen_word) and guesses_left: _, guesses_left = map(guesses.add, filter(str.isalpha, raw_input('%s(%s guesses left)\n%s\n%s:' % (','.join(sorted(guesses)), guesses_left, scaffold.format(*(man[:10-guesses_left] + [' '] * guesses_left)), ' '.join(letter if letter in guesses else '_' for letter in chosen_word))).upper())), max((10 - len(guesses - set(chosen_word))), 0) | |
print 'You', ['lose!\n' + scaffold.format(*man), 'win!'][bool(guesses_left)], '\nWord was', chosen_word |
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
/* | |
* A function that converts a PostGIS query into a GeoJSON object. | |
* Copyright (C) 2012 Samuel Giles <sam@sam-giles.co.uk> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
const fetch = require("node-fetch"); | |
const cheerio = require("cheerio"); | |
const diff = require("diff"); | |
const colors = require("colors"); | |
const inputSlug = process.argv[2]; | |
const notImplemented = [ | |
"[rel=amphtml]", | |
"[property='og:image']", |
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
(function (global) { | |
function clean(css) { | |
return css | |
.replace(/\/\*[\W\w]*?\*\//g, "") // remove comments | |
.replace(/^\s+|\s+$/g, "") // remove trailing spaces | |
.replace(/\s*([:;{}])\s*/g, "$1") // remove trailing separator spaces | |
.replace(/\};+/g, "}") // remove unnecessary separators | |
.replace(/([^:;{}])}/g, "$1;}") // add trailing separators | |
} |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# ----------------------------------------------------------------------------- | |
# Copyright INRIA | |
# Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr) | |
# | |
# DANA is a computing framework for the simulation of distributed, | |
# asynchronous, numerical and adaptive models. | |
# | |
# This software is governed by the CeCILL license under French law and abiding |
OlderNewer