Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
<?php
/*
file: proxy64.php
function: convert an image to a base64 string
author: Roel van der Ven
date: 16.06.2011
*/
@roelven
roelven / tweet
Created June 16, 2011 12:47
hashtagreturn
{
"entities": {
"user_mentions": [],
"urls": [],
"hashtags": [{
"text": "omghackday",
"indices": [0, 11]
}]
},
"text": "#omghackday yeah!",
@roelven
roelven / gist:981330
Created May 19, 2011 17:49
booting vm when in 64bit
[default] Importing base box 'bentobox'...
[default] Matching MAC address for NAT networking...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.0.4
VirtualBox Version: 4.0.8
Roel@Eli:~/Sites/soundcloud [git:master] $ ioreg -l -p IODeviceTree | grep firmware-abi
| | "firmware-abi" = <"EFI64">
Roel@Eli:~/Sites/soundcloud [git:master] $ sudo systemsetup -setkernelbootarchitecture x86_64
Password:
setting kernel architecture to: x86_64
changes to kernel architecture have been saved.
=====================
@roelven
roelven / .rvmrc
Created April 28, 2011 14:54
Setup your Bentobox using .rvmrc
##
# Use this file as your .rvmrc in your SoundCloud directory
#
# $ vagrant up
# $ vagrant ssh
## (You're now inside the VM)
# $ sudo su soundcloud
# $ cd shared_folder
#
# The VM will now run bundle install, bootstrap your db + populate it, and start the app.
{
"profile": {
"name": "Marco",
"surname": "Hamersma",
"date-of-birth": "617950800",
"age": 21,
"hometown": "Oud-Beijerland",
"location": "Berlin, Germany",
"tagline": "Dutch. 21. Student Communication & Multimedia Design, Interaction Designer & Creative developer, likes making awesome stuff & playing guitar. Intern @SoundCloud",
"work": [{
def app_link_for_user(app)
if app.public?
app_path(app)
elsif app.user == current_user
self_edit_app_path(app)
else
app.url
end
end
@roelven
roelven / gist:903901
Created April 5, 2011 16:07
.gitconfig systemwide
[user]
name = Roelven
email = [email protected]
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
@roelven
roelven / .gitconfig
Created March 30, 2011 15:01
Mod + add this to your git config
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
@roelven
roelven / gist:878571
Created March 20, 2011 19:12
wp enqueue scripts + headJS
// Enqueue Javascripts
// Replace jQuery 1.4.4 with 1.5 on the frontend
// as seen on http://codex.wordpress.org/Function_Reference/wp_enqueue_script
// Do not do this on the wp-admin, jQuery 1.5 might break functionality at this point (March 2011)
function rv_enque_scripts() {
// get theme to use that for versioning and cache busting
$theme = get_theme(get_current_theme());
if (!is_admin()) {
// remove jQuery 1.4.4
wp_deregister_script('jquery');