Skip to content

Instantly share code, notes, and snippets.

@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@TooTallNate
TooTallNate / bbs.js
Created March 16, 2012 22:42
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
@hughsk
hughsk / .gitignore
Created September 18, 2012 01:19
Trickle
node_modules
@SomeKittens
SomeKittens / IHATEYOU.sh
Last active December 16, 2015 01:19
Ever wanted to yell at your terminal? Now you can!
#!/bin/bash
#Needed to provide alias expansion (so we can use those aliases after the script's finished)
shopt -s expand_aliases
while read x;
do
a=`echo $x | tr '[:lower:]' '[:upper:]'`;
#Added because the script was picking up empty lines
if [ "$a" != '' ]
@shanselman
shanselman / gist:5422230
Last active March 28, 2024 10:33
Evil Blog Comment Spammer just exposed his template through some error and the whole thing showed up in my comments.
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
@sumardi
sumardi / gist:5559896
Created May 11, 2013 12:56
Subdirectory checkouts with Git sparse-checkout
# New repository
mkdir <repo> && cd <repo>
git init
git remote add –f <name> <url>
git config core.sparsecheckout true
echo some/dir/ >> .git/info/sparse-checkout
echo another/sub/tree >> .git/info/sparse-checkout
git pull <remote> <branch>
# Existing repository
@werty1st
werty1st / sparse checkout
Created September 17, 2013 12:03
git sparse checkout
What you are trying to do is called a sparse checkout, and that feature was added in git 1.7.0 (Feb. 2012). The steps to do a sparse clone are as follows:
git init <repo>
cd <repo>
git remote add -f origin <url>
This creates an empty repository with your remote. Then do:
git config core.sparsecheckout true
Now you need to define which files/folders you want to actually check out. This is done by listing them in .git/info/sparse-checkout, eg:
@rlemon
rlemon / readme.md
Last active June 27, 2019 12:19
copy of the deleted readme. I just stitched it together from the commit logs.

geek-misandry

Typical reaction formulae for misandrists

####1. "Wow, just wow."

This is the #1 goto for misandrists. It discourages any actual logical discussion, and just implies that the person you are talking to is so ignorant that it is, somehow, totally impossible for you to hold any sort of fruitful discussion with them.

@franga2000
franga2000 / Ubuntu on Acer Aspire Switch 10.md
Last active January 31, 2024 21:40
Ubuntu on Acer Aspire Switch 10

Ubuntu on Acer Aspire Switch

The problem

What's the problem with this tablet? Why can't I just insert the USB and mash F12 until it boots? The tablet is made to run Windows 8.1 and Windows 8.1 only. Some absolute genius at Acer decided to put a 32-bit UEFI on a 64-bit system, which no reasonable Linux distro supports out-of-the-box.

NOTE: This guide focuses on installing Ubuntu alongside Windows. If you're trying to replace Windows, then I assume you know enough about Linux to know which parts to change.

What works:

  • Keyboard
@joepie91
joepie91 / getting-started.md
Last active February 21, 2024 14:45
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!