Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
attr = lighty.stat(lighty.env["physical.path"])
if (not attr) then
lighty.env["uri.path"] = "/index.php"
lighty.env["physical.rel-path"] = lighty.env["uri.path"]
lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
end
{
"error": {
"type": "4107",
"message": "Invalid Csrf token"
},
"version": 9,
"client_version": "0.6.1.287.g64b130c8"
}
FB.getLoginStatus: connected > Object
perms: "{"extended":["email","contact_email","publish_actions"],"user":[],"friends":[]}"
session: > Object
access_token: "19507961798|2.AQB6WnLY4HLeEoem.3600.1315231200.1-565915644|OPaFjyXlXiswhkr7EKqSvSDihDk"
base_domain: "soundcloud.com"
expires: 1315231200
secret: "_B8j4wjsd9ly9mzPuR8nAA__"
session_key: "2.AQB6WnLY4HLeEoem.3600.1315231200.1-565915644"
sig: "4b1cfb650c0a15e92d8c5236d648e19f"
uid: "565915644"
<?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