Skip to content

Instantly share code, notes, and snippets.

View danielkza's full-sized avatar

Daniel Miranda danielkza

  • Vonage
  • London, United Kingdom
View GitHub Profile
--- !ruby/object:Gem::Specification
name: kalibro_client
version: !ruby/object:Gem::Version
version: 4.0.0
platform: ruby
authors:
- Daniel Quadros Miranda
- Diego de Araújo Martinez Camarinha
- Heitor Reis Ribeiro
- Rafael Reggiani Manzo
@danielkza
danielkza / download_ego_top.py
Created June 15, 2016 23:21
extensions.gnome.org crawler - downloads extensions available, ordered by popularity. Usage: ./download_ego_top.py dest_dir max_num shell_version. Requires wget and GNU parallel installed.
#!/bin/env python3
import os
import sys
import urllib.request
import json
import subprocess
EXTENSION_BASE_URL = 'https://extensions.gnome.org'
EXTENSION_QUERY_URL_FORMAT = EXTENSION_BASE_URL + '/extension-query/?sort=popularity&page={page}'
@danielkza
danielkza / .gitignore
Created November 15, 2015 01:04
gitignore for home
*
!.gitignore
!/.bash*
!/.zsh/
!/.zsh/*
!/.env*
!/.aliases*
!/.profile*
@danielkza
danielkza / ignore-ms-fonts.css
Created June 25, 2015 03:58
Ignore Microsoft Fonts
@namespace url("http://www.w3.org/1999/xhtml");
@font-face { font-family: 'Andale Mono'; src: local('monospace'); }
@font-face { font-family: 'Arial'; src: local('sans-serif'); }
@font-face { font-family: 'Arial Black'; src: local('sans-serif'); }
@font-face { font-family: 'Calibri'; src: local('serif'); }
@font-face { font-family: 'Cambria'; src: local('serif'); }
@font-face { font-family: 'Candara'; src: local('sans-serif'); }
@font-face { font-family: 'Comic Sans MS'; src: local('sans-serif'); }
@font-face { font-family: 'Consolas'; src: local('monospace'); }
#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/danielkza/.PlayOnLinux//wineprefix/lol2"
export WINEDEBUG="-all"
LOL_DIR="$HOME/Games/League of Legends"
BEFORE_WINE='env LD_PRELOAD=libpthread.so.0:libGL.so.1 __GL_THREADED_OPTIMIZATIONS=1'
#!/bin/sh
CONFIG_FILE="$HOME/.config/twitchstreamrc"
if ! [ -f "$CONFIG_FILE" ]; then
echo "Missing configuration file ('$CONFIG_FILE')" 1>&2
exit 1
fi
. "$CONFIG_FILE"
@danielkza
danielkza / fedora-bfq.py
Last active May 2, 2017 15:23
Script to build a BFQ-patched kernel from Fedora packages
#!/usr/bin/env python2.7
from __future__ import print_function
import sys
import os.path
import re
import shutil
from glob import glob
from HTMLParser import HTMLParser
from subprocess import check_output, check_call, Popen, CalledProcessError, PIPE
io = require("io")
os = require("os")
function read_all(file)
local f = io.open(file, "rb")
if not f then
return nil
end
local content = f:read("*a")
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
char buf[16];
while(fgets(buf, sizeof(buf), stdin) != NULL) {
char *space_pos = strchr(buf, ' ');
#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/danielkza/.PlayOnLinux/wineprefix/lol32"
export WINEDEBUG="-all"
export LOGFILE="/home/danielkza/.PlayOnLinux/logs/lol.log"
LOL_PATH="/games/League of Legends/"