Skip to content

Instantly share code, notes, and snippets.


Ignacio Rivas sabarasaba

View GitHub Profile
sabarasaba / gist:3080590
Created Jul 10, 2012
Remove directory from remote repository after adding them to .gitignore
View gist:3080590
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
sabarasaba / gist:1387550
Created Nov 23, 2011
Setting a timeout for the file_get_contents function
View gist:1387550
// Create the stream context
$context = stream_context_create(array(
'http' => array(
'timeout' => 3 // Timeout in seconds
// Fetch the URL's contents

Paying for stuff in the netherlands

Most places dont accept visa or masterdard. They will just tell you "no creditcard accepted" even if you have a mastercard debit card. The defacto payment method for most places is just maestro (yes, welcome to 1987). So places like the supermarket close to home only accepts cash or maestro. If you dont have one ask before hand if they accept "credit card" :) Most pin machines will also have this sign if they dont accept.

Everyday shops




  • Airbnb address: Nakagyō-ku, Kyōto-shi, Kyōto-fu 604-8856
  • Host name: Eikosha
  • Host phone number: +81-70-5666-7001 +81-90-2238-8769

Things to do/see

sabarasaba / index.js
Created Aug 31, 2017
reminders testing
View index.js
const request = require('request-promise')
uri: '',
method: 'POST',
json: true,
headers: {
token: 'f68ade7424a096e54f2ceb69118832f9'
body: {

Keybase proof

I hereby claim:

  • I am sabarasaba on github.
  • I am sabarasaba ( on keybase.
  • I have a public key ASCYP5urbN8JpNdfZI6OIlWGmtZQNxNudiPpgR4g1TimQAo

To claim this, I am signing this object:

sabarasaba /
Last active Dec 25, 2015
Debugging webapps in Android default browser

Install the weinre module from npm:

$ sudo npm -g install weinre

In your index.html add the following line before closing the head section:

<script src="http://your-local-ip:8081/target/target-script-min.js#anonymous"></script>
View index.js
var o = '{ "user": "tu vieja", "posts": [ { "title": "title 1", "contents": "..." }, { "title": "title 2", "contents": "..." } ] }';
var fetchShit = function() {
var def = $.Deferred();
setTimeout(function() {
}, 2000);
return def.promise();
sabarasaba / gist:3975451
Created Oct 29, 2012
Get the current State of the user.
sabarasaba / gist:1362220
Created Nov 13, 2011
Get first url video that matches with the given text
View gist:1362220
function getYoutubeLink($title)
@$videoName = ereg_replace('[[:space:]]+', ' ', trim($videoName));
$videoName = urlencode($videoName);
// generate feed URL
$feedURL = "{$videoName}";