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 script for importing old ratings MediaWiki extension http://www.mediawiki.org/wiki/Extension:AjaxRatingScript | |
# into a dump for more suitable new extension http://www.mediawiki.org/wiki/Extension:VoteNY | |
# Using LP_solve Python wrapper | |
from lpsolve55 import * | |
import MySQLdb | |
def main(): | |
host = "localhost" |
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
/** Make filename readonly, so filename is either the default one defined in the form or the filename in your drive **/ | |
$("#mw-upload-form #wpDestFile").attr('readonly', true); | |
/** Keep file extension in upload. Default filename is changed according the filename extension uploaded **/ | |
$("input:file").change(function (){ | |
var filename = $('input[type=file]').val().replace(/C:\\fakepath\\/i, ''); | |
var extension = filename.substr( (filename.lastIndexOf('.') +1) ); | |
var subs = "."+extension; | |
var filenamef = $("#wpDestFile").val(); | |
var extensionf = filenamef.substr( (filenamef.lastIndexOf('.') +1) ); |
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 -w | |
use MediaWiki::Bot; | |
use LWP::Simple qw(get); | |
use JSON qw(from_json); | |
use URI::Escape; | |
use Data::Dumper; | |
use utf8; | |
binmode STDOUT, ":utf8"; |
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
<?xml version='1.0' encoding="ISO-8859-1" ?> | |
<!-- | |
XSLT 1.0 Stylesheet for converting NCBI PSIBLAST XML into JSON with different string params as input | |
Usage: xsltproc psiblast.xsl output.xml > output.json | |
Toni Hermoso Pulido @toniher, 2014 - GPLv 3 or later | |
Reference http://plindenbaum.blogspot.com.es/2008/05/ncbi-blast-xslt-xhtml-svg.html | |
--> | |
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' > | |
<xsl:output method="text" /> |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 3 in line 1.
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
Rcode Name RGB HTML | |
1 white 255,255,255 #FFFFFF | |
2 aliceblue 240,248,255 #F0F8FF | |
3 antiquewhite 250,235,215 #FAEBD7 | |
4 antiquewhite1 255,239,219 #FFEFDB | |
5 antiquewhite2 238,223,204 #EEDFCC | |
6 antiquewhite3 205,192,176 #CDC0B0 | |
7 antiquewhite4 139,131,120 #8B8378 | |
8 aquamarine 127,255,212 #7FFFD4 | |
9 aquamarine1 127,255,212 #7FFFD4 |
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
Verifying that +toniher is my Bitcoin username. You can send me #bitcoin here: https://onename.io/toniher |
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 | |
# Script for exporting MySQL tables into a CSV. | |
use strict; | |
use warnings; | |
use DBI; | |
use Text::CSV; | |
use JSON qw( decode_json ); |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: YOUR_NAME_HERE | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop the forever nodejs application. Requires chpst | |
### END INIT 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
#!/bin/bash --debugger | |
set -e | |
BRANCH="master" | |
if grep -q BCM2708 /proc/cpuinfo; then | |
echo "RPI BUILD!" | |
RPI="1" | |
fi | |
[ -n "$1" ] && BRANCH=$1 |
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
#!/bin/bash | |
mkdir -p /tmp/hls | |
on_die () { | |
# kill all children | |
pkill -KILL -P $$ | |
} | |
trap 'on_die' TERM |
OlderNewer