Skip to content

Instantly share code, notes, and snippets.

@gbirke
gbirke / MultiFeedExporter.py
Last active October 16, 2020 21:57
MultiFeedExporter.py
import inspect
import importlib
from datetime import datetime
from twisted.internet import defer
from scrapy import log
from scrapy.contrib.feedexport import FeedExporter, SpiderSlot

Keybase proof

I hereby claim:

  • I am gbirke on github.
  • I am chiborg (https://keybase.io/chiborg) on keybase.
  • I have a public key whose fingerprint is 2BB9 36CE 7B6F 86B5 8A9B F5AF 5A73 908E 7FD4 B4D6

To claim this, I am signing this object:

@gbirke
gbirke / Python-Experimente.ipynb
Last active August 29, 2015 14:08
Python Experimente iPython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gbirke
gbirke / named_group_capturing.js
Created December 12, 2014 01:28
Regex named group capturing in JavaScript
// These three functions are for creating a map between named groups in RegExp objects
// cleaning the named groups from regular expressions and to assign the captured items according to the map.
function getMap(rx) {
var braceMatch = /(?:^|[^\\])\((?!\?)(\:<(\w+)>)?/g,
braceMap = {},
braceCount = 0,
source = (rx instanceof RegExp) ? rx.source : rx,
match;
while ((match = braceMatch.exec(rx)) !== null) {
@gbirke
gbirke / Default.sublime-commands
Created January 21, 2015 13:07
FUSEKI text tables to Markdown
[
{
"caption": "Reg Replace: Fuseki Table to Markdown",
"command": "reg_replace",
"args": {"replacements": [
"fuseki_table_begin_end",
"fuseki_quote_resource",
"fuseki_remove_dash_lines",
"fuseki_replace_equal_lines"
]}
@gbirke
gbirke / Hash-Experiments.ipynb
Last active August 29, 2015 14:15
Hash-Experiments
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
"""
Merge the translatable properties of VIVO and Vitro and compare to the
German property file. Output all missing dictionary keys.
"""
read_vitro = open("vitro_all.properties", "r")
read_vivo = open("vivo_all.properties", "r")
read_all = open("all_de_DE.properties", "r")
writefile = open("new.properties", "w")
@gbirke
gbirke / apple-numpad.zsh
Created July 2, 2015 11:37
Restore Apple numpad keybindings in ZSH
# Restore Apple numpad keybindings in ZSH
bindkey -s "^[Op" "0"
bindkey -s "^[On" "."
bindkey -s "^[OM" "^M"
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
# Gabriels Theme - based on jreese theme but with different colors
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%}:%~ \
$(git_prompt_info)\
%{$fg[red]%}%(!.#.$)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPROMPT='${return_code}!%{%B%F{cyan}%}%!%{%f%k%b%}'
@gbirke
gbirke / highlight.php
Last active January 14, 2016 13:23
Testing the GitHub highlighting algo
<?php
// Testing the GithUb PHP 7 syntax highlighting
// Without the scalar type hint it's ok
function foo( $str = '' ) {
echo "test";
}