This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function oembed_get_data($video_url, array $params = array(), &$error = null) | |
{ | |
$html = @file_get_contents($video_url); | |
if (!$html) | |
{ | |
$error = 'Could not download video page'; | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the current application | |
tell application "System Events" to set current_app to the name of the first process whose frontmost is true | |
# Try to get the folder to the current open document of this application | |
# Fall back to the users home if that doesn't work | |
try | |
tell application current_app | |
set current_win to the first window | |
set path_to_file to the path of the document of current_win | |
set pwd to "`dirname \"" & path_to_file & "\"`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cd() { | |
builtin cd "$1" | |
echo -ne "\033]0;`pwd`\007" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FacebookAPI | |
{ | |
protected $_token; | |
public function __construct($token) | |
{ | |
$this->_token = $token; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name iCal links for De Oosterpoort | |
// @namespace http://ikhoefgeen.nl/userscripts | |
// @description Create iCal events directly from De Oosterpoort website | |
// @include http://www.de-oosterpoort.nl/programma/* | |
// ==/UserScript== | |
// Credits: | |
// Base64 encode / decode | |
// http://www.webtoolkit.info/ | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GCal links for De Oosterpoort | |
// @namespace http://ikhoefgeen.nl/userscripts | |
// @description Create Google Calendar events directly from De Oosterpoort website | |
// @include http://www.de-oosterpoort.nl/programma/* | |
// ==/UserScript== | |
var DeOosterpoort = {} | |
DeOosterpoort.findData = function(root) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SV Cover last thread | |
// @namespace http://ikhoefgeen.nl/userscripts | |
// @description Programmeurs kunnen geen interfaces maken. | |
// @include http://www.svcover.nl/* | |
// ==/UserScript== | |
function setLastPage(thread_id, page) | |
{ | |
localStorage['thread-' + thread_id] = page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Page widget | |
Description: Use a page as a widget in the sidebar | |
Author: Jelmer van der Linde | |
Version: 1.0 | |
Author URI: http://ikhoefgeen.nl | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void find_char(char what, char *letters, int letters_size, int **positions, int *positions_size) | |
{ | |
int i; | |
int hits = 0; | |
/*tel aantal maal dat letter voorkomt om te bepalen hoeveel posities we moeten reserveren.*/ | |
for (i = 0; i < letters_size; ++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Sickbeard clickable links | |
// @description Sick clicketyclick | |
// @include http://*/home/displayShow?show=* | |
// @author Jelmer van der Linde, idea by Nino van Hooff | |
// @version 1.1 | |
// ==/UserScript== | |
function findBasePath() | |
{ |
OlderNewer