Skip to content

Instantly share code, notes, and snippets.

View Tomoli75's full-sized avatar

Thomas Tomoli75

  • England, United Kingdom
View GitHub Profile
@timnovinger
timnovinger / proxy.pac
Created May 10, 2010 04:19
Proxy PAC file for watching UK telly outside of the UK
// ========================================================
// Route traffic through UK based proxy
// ========================================================
function FindProxyForURL(url, host) {
// --------------------------------------------------------
// No longer work still it seems
// --------------------------------------------------------
// 92.52.125.20:80
@vitorbrandao
vitorbrandao / php-sanitize-filename
Created April 25, 2011 15:52
Sanitize PHP filenames for UNIX/Linux
<?php
/**
* Helper holds a collection of static methods, useful for generic purposes
*/
class Helper
{
/**
* Returns a safe filename, for a given platform (OS), by replacing all
* dangerous characters with an underscore.
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@adammw
adammw / omegle_chat.js
Created August 4, 2011 16:56
Omegle Command Prompt Chat Client written in Node.JS
/*
* Omegle Command Prompt Chat Client
* =================================
* Version 1.0 by adammw111
* Requires Node.JS
*/
var net = require('net');
var OMEGLE_HOST = 'cardassia.omegle.com';
var OMEGLE_PORT = 1365;
@lahwran
lahwran / ChangePlayerName.java
Created September 2, 2011 12:33 — forked from jmurth1234/ChangePlayerName.java
Change Player Name Source code
package net.rymate.ChangeName;
import java.util.logging.Logger;
import net.minecraft.server.EntityPlayer;
import net.minecraft.server.EntityTracker;
import net.minecraft.server.WorldServer;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.entity.CraftPlayer;
@dtrce
dtrce / mp3.js
Created September 8, 2011 18:39
streaming mp3 using nodejs
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@Bodacious
Bodacious / README.md
Created January 24, 2012 20:29
New York Address generator

NY Address Generator

60% of the time it works EVERY time!

Installing

  gem 'ny_address', git: 'git://gist.github.com/1672379.git'
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 4, 2025 14:30
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname