Skip to content

Instantly share code, notes, and snippets.

Christopher Beloch CBeloch

  • Gronau / NRW / Germany
Block or report user

Report or block CBeloch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@CBeloch
CBeloch / ghost_update.py
Created Jun 22, 2016
Automate your ghost update process
View ghost_update.py
import sys
import json
import urllib2
import tempfile
import os
GHOST_PROJECTS = [
"./ghost"
]
@CBeloch
CBeloch / SerienplakatNotifier.js
Last active Nov 6, 2017
Serienplakat notifier
View SerienplakatNotifier.js
/*
Requires jsdom and request.
Grabs serienplakat.de to check for free posters
*/
var dom = require('jsdom');
var request = require('request');
var mainURL = 'http://serienplakat.de';
var detailURL = mainURL + '/backend/_ajax.php';
var scripts = ['http://code.jquery.com/jquery.js'];
@CBeloch
CBeloch / .bash_profile
Created Dec 7, 2015
My tuned .bash_profile for OS X
View .bash_profile
# Activate colors
export CLICOLOR='true'
export LSCOLORS="gxfxcxdxbxCgCdabagacad"
export EDITOR=vi
# Git branch in good-looking prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
@CBeloch
CBeloch / .htaccess
Last active Nov 29, 2016
Giphy - Random GIF by Tag
View .htaccess
# Will allow to use a .gif extension.
# Script can now be used as www.mydomain.com/pokemon.gif
RewriteEngine on
RewriteRule ^(.*).gif giphy.php?tag=$1 [L,QSA]
View wp-rss-images.php
if($enclosure){ // this is Line 78
list($width, $height, $type, $attr) = getimagesize($url);
echo '<enclosure url="' . $image_url . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'" />';
}
if($media){
list($width, $height, $type, $attr) = getimagesize($url);
echo '<media:content url="'.$image_url.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'" />';
}
You can’t perform that action at this time.