Skip to content

Instantly share code, notes, and snippets.

View robxu9's full-sized avatar
📑
ping me directly if you need my attention

Robert Xu robxu9

📑
ping me directly if you need my attention
View GitHub Profile
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@tchon
tchon / webkitscreenshot.py
Created May 11, 2011 18:07 — forked from bellbind/webkitscreenshot.py
[python][webkitgtk][PIL][X][tool] get web site thumbnail by webkit
#!/usr/bin/env python
"""
web page screenshot by webkit
command usage:
python webkitscreenshot.py test.html
library usage:
import webkitscreenshot
image = webkitscreenshot.screenshot_vfb("file://test.html")
@Dinnerbone
Dinnerbone / Since 1.2.3
Created March 4, 2012 18:16
Bugs I've fixed since 1.2.3!
Fixed:
- Fixed godmode exploit (Thanks md_5)
- Limit framerate on menu screens, no longer uses 100% cpu and make my computer melt
- Fixed fatal crash for converted worlds to anvil, when there's blocks at max height
- Fixed an old bug with signs clearing text while you're editing them in SMP
- Fixed incorrectly swapped en_GB and en_CA language details
- Fixed crash when logging in while there are blocks at maxheight at spawn
- Fixed TNT ghosts in multiplayer
- Fixed storage minecarts dropping enchanted items
- Fixed crashes on invalid server addresses when joining a server
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>
@jboner
jboner / latency.txt
Last active July 27, 2024 12:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 27, 2024 16:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Pamelloes
Pamelloes / RandomPronouncableText.java
Created July 16, 2012 03:45
Program that generates pronouncable, random text.
import java.util.ArrayList;
import java.util.List;
public class RandomPronouncableText {
private static Object[][] letterCombinations = {
//letter vowel "L" "R" Random Following Letters Prefixing Letters
{"a" ,true},
{"b" ,false ,true ,true ,true ,new String[]{} ,new String[]{} },
{"c" ,false ,true ,true ,true ,new String[]{"h","k"} ,new String[]{} },
{"d" ,false ,false ,true ,true ,new String[]{} ,new String[]{} },
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@lukespragg
lukespragg / sign4j.c
Last active August 2, 2018 15:57
Sign4j for Linux
/*
sign4j.c: a simple utility to sign executables created by Launch4j
Copyright (c) 2012 Grzegorz Kowal
Modified for Linux by Luke Spragg (Wulfspider), Dalton Pelc (Olloth), Contex, and raphfrk
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

As part of an effort to figure out what my fellow students are working on, I'm assembling a list of GitHub usernames for Stony Brook Computing Society Members. You should follow these people and maybe ask them if they'd like to collaborate with you on some project or other. Have more usernames? Suggest additions!

#Members Past and Present