Skip to content

Instantly share code, notes, and snippets.

kyledrake / ferengi-plan.txt
Last active January 19, 2023 10:42
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# The blog post that started it all:
# Current known FCC address ranges:
# Confirm/locate FCC IP ranges with this:
# In your nginx.conf:
location / {
Plastix / name_checker.php
Created December 30, 2013 17:00
PHP script used for checking the availability of Minecraft usernames. Requires a text file called names.txt in the same directory as the script with one name per line. Available names are saved to available_names.txt.
View name_checker.php
// Checks the availability of Minecraft usernames given a text file of names
$names = Array();
$input = "./names.txt"; //Names to be checked (one per line)
$output= "./available_names.txt"; //Available names
$names = file($input, FILE_IGNORE_NEW_LINES);
if(file_exists($output)) file_put_contents($output, "");
foreach( $names as $name ) {
anonymous / night-before-opsmas.txt
Created December 24, 2013 07:19
Twas the night before Opsmas..
View night-before-opsmas.txt
'Twas the night before Christmas, when all through the racks
Not a server was alerting, not even Compaqs.
The backups were written to tapes with care
In hopes that later the data would be there.
The machines were nestled all snug in their sleds
Whilst visions of vengeance danced in their heads;
And oncall in his three-wolf and I in my rack.
Had just settled down for some syn and some ack.
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
aadnk /
Last active September 15, 2020 10:13
Edit attributes in 1.6.2 (Not dependent on ProtocolLib). See for 1.7.2.
package com.comphenix.example;
import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Dinnerbone / gist:5631634
Last active May 14, 2020 12:41
New chat system for Minecraft. The server won't translate any text for the client, and there'll be a proper stack based colouring/formatting system, so no more leaking colours, english-only messages, or out of date translations.
View gist:5631634
"color": "yellow",
"translate": "multiplayer.player.joined",
"using": [
"color": "gray",
tonybruess / Bukkit Entity
Last active November 27, 2017 18:59
Bukkit Entity Spawning
View Bukkit Entity

Entities that work:

  • Arrow
  • Bat
  • Blaze
  • Boat bow charge has no effect, always spawns on player head
  • CaveSpider
  • Chicken
  • Cow
  • Creeper
  • Egg
csexton / deploy.rb
Created January 10, 2013 16:53
Capistrano Recipe to skip asset compilation if nothing has changed
View deploy.rb
namespace :deploy do
namespace :assets do
def should_update_assets
from = source.next_revision(current_revision)
capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
task :precompile, :roles => :web, :except => { :no_release => true } do
geuis / remote-typeahead.js
Created February 16, 2012 22:58
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
View remote-typeahead.js
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){