Skip to content

Instantly share code, notes, and snippets.

View orangejulius's full-sized avatar
🌍
making Geocode Earth and open data better :)

Julian Simioni orangejulius

🌍
making Geocode Earth and open data better :)
View GitHub Profile
@orangejulius
orangejulius / Makefile
Created May 26, 2012 00:46
strlen performance comparison
all: mystrlen strlen
mystrlen: mystrlen.c makestrs.h
gcc -O2 mystrlen.c -o mystrlen
strlen: strlen.c makestrs.h
gcc -O2 strlen.c -o strlen
clean:
rm mystrlen strlen
test: mystrlen strlen
time ./mystrlen > /dev/null
time ./strlen > /dev/null
@orangejulius
orangejulius / mymemcpy.c
Created October 5, 2012 23:25
Simple memcpy implementation
#include <stdio.h>
#include <string.h>
void* my_memcpy(void* destination, void* source, size_t num)
{
int i;
char* d = destination;
char* s = source;
for (i = 0; i < num; i++) {
d[i] = s[i];
@orangejulius
orangejulius / testWriteAmplification.c
Created November 29, 2012 08:16
C program to write 4096 bytes starting at a random 512b sector, with sector offset passed in from the command line. Try it with your 4K sector hard drive (or SSD): non zero offsets will significantly reduce performance. Use only on an empty disk
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
char buffer[4096];
int main(int argc, char *argv[])
{
int fd, i, off;
long bk, byte;
user_ids = ''
results.each do |result|
user_ids += results[:twitter_id] + ', '
end
#!/bin/bash
createTunnel() {
/usr/bin/ssh -f -N -R 10022:localhost:22 -L19922:juliansimioni.com:27823 juliansimioni.com
if [[ $? -eq 0 ]]; then
echo Tunnel to hostb created successfully
else
echo An error occurred creating a tunnel to hostb RC was $?
fi
}
@orangejulius
orangejulius / timelapse
Created September 24, 2013 07:32
Create a timelapse from a directory full of images. Pass the directory name as the first parameter and a .mkv file with the name of that directory will be created. Requires ffmpeg
#!/bin/bash
pictureDir=$1
# make symlinks
pushd $pictureDir
j=0
for i in `ls *.JPG`; do
ln -s $i $j.jpg
This file has been truncated, but you can view the full file.
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /usr/share/maven-bin-3.0
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.8.0.25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.0-rc3+", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven-bin-3.0/conf/settings.xml
[DEBUG] Reading user settings from /home/spectre256/.m2/settings.xml
[DEBUG] Using local repository at /home/spectre256/.m2/repository
@orangejulius
orangejulius / Keybase.md
Created March 13, 2015 18:36
Keybase.md

Keybase proof

I hereby claim:

  • I am orangejulius on github.
  • I am juliansimioni (https://keybase.io/juliansimioni) on keybase.
  • I have a public key whose fingerprint is C970 12C1 ECEB 6E88 38E3 67BF B9EE B0C6 EE09 10A1

To claim this, I am signing this object:

require 'git'
require 'logger'
revert_branch_name = "origin/remove-failing-tests"
working_dir = '.'
g = Git.open(working_dir, :log => Logger.new(STDOUT))
base_commit = g.gcommit('5b78d2b')
branch_tip_commit = g.gcommit(revert_branch_name)

CPF Open

  • NationJS, Washington DC, USA, March 11, CPF Closes Jan 28
  • Scotland JS, Edinburg, Scotland, June 2-3, CPF Closes Jan 30
  • Ruby on Ales, Bend, OR, March 31/April 1, CPF Closes Jan 31st
  • Midwest JS, Minneapolis, Minnesota, Aug 10-12, CPF Closes March 5th

CPF Closed

  • wroc_love.rb, Wroclaw, Poland, March 11-13, CPF Closed Jan 11
  • Ancient City Ruby, St. Augustine, FL, April 6-8, CPF Closed Jan 11
  • Railsconf, Kansas City, MO, May 4-6, CPF Closes Jan 15