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
// Basically, dynamically selects between BabelExt and Greasemonkey methods, | |
// depending on what is avalaible at runtime | |
// | |
// Simply put this at the top of your userscript, and use BE_set/getValue | |
// exactly as you would BabelExt.storage.set/get | |
// | |
// However, there is also another argument passed to getValue, def, as in the | |
// default value if none can be retrieved (as in Greasemonkey's GM_getValue) | |
function BE_setValue(key, val, callback) { |
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
--- Python.tmLanguage | |
+++ Python-formatstrings.tmLanguage | |
@@ -1171,7 +1171,7 @@ | |
<key>constant_placeholder</key> | |
<dict> | |
<key>match</key> | |
- <string>(?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])</string> | |
+ <string>(?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])|(?<=[({{)+]|[^{])({[0-9a-zA-Z]*(\.[0-9a-zA-Z]*)?(\[([^\])]*)\])?(![rsa])?(:)?})(?=(}})+|[^}])</string> | |
<key>name</key> | |
<string>constant.other.placeholder.python</string> |
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
#!usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
## And this is the modified Bitbucket library I use. I have to bundle this, because the actual one is broken | |
# -*- coding: utf-8 -*- | |
# git+git://github.com/Sheeprider/Py-BitBucket.git | |
__all__ = ['Bitbucket', ] |
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
# COLOURS | |
set -g default-terminal "screen-256color" | |
# Status bar can have utf-8~ | |
set-option -g status-utf8 on | |
# Status bar has a dim gray background | |
set-option -g status-bg "#303030" | |
set-option -g status-fg "#f0f0f0" |
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
/************************************************************************ | |
* IRC - Internet Relay Chat, | |
* Copyright (C) 2001 Hybrid Development Team | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 1, or (at your option) | |
* any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
// First (proper) try at OpenGL programming, and first bit of C-like stuff | |
// for years, besides a quick dabble in C# ; caveat emptor | |
// | |
// Daniel Oaks 2013, public domain etc | |
// | |
// g++ -Wall -L/usr/lib -lGL -lGLU -lglut --std=c++11 particles.cpp -o particles | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <random> | |
#include <functional> |
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
#!/usr/bin/env perl | |
# Dashpipe -- Hopefully a kinda faster, less fully-featured ponypipe. | |
# Copyright (c) 2013, Daniel Oaks, under 2-clause BSD license. | |
# the base regex list is from Ponypipe: | |
# https://github.com/maandree/ponypipe | |
use strict ; | |
use utf8 ; # we like utf8 | |
use constant { true => 1, false => 0 } ; # I think these make sense, syntactically |
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
#!/usr/bin/env python3 | |
# ZNC log unifier | |
# assumes all the logs are in folder 'log' | |
# and all files are output to folder 'outlog' | |
# This basically changes all the logs like: | |
# log/danneh_rizon_#chan_20142304.log | |
# log/danneh_rizon_#chan_20142305.log | |
# log/danneh_rizon_#chan_20142306.log | |
# to: |
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
#!/usr/bin/env python2 | |
# Reckon IIF item list barcode adder | |
# written by Daniel Oaks <[email protected]> | |
# licensed under the BSD 2-clause license | |
# Caution: DO NOT USE IIF. IT CAN BORK YOUR SYSTEM EASILY. | |
# This basically reads through each item in your item IIF, to see if it has a barcode | |
# if it doesn't have a barcode and the item name contains a digit, it makes the barcode the same |
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
# platform library extension adder for Python or something | |
import os | |
import sys | |
__PLATFORM_LIBRARY_EXTENSIONS = { | |
'windows': 'dll', | |
'darwin': 'dylib', | |
'linux': 'so', | |
} |
OlderNewer