This file contains hidden or 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
| const { spawnSync } = require("child_process"); | |
| const fs = require("fs"); | |
| // TODO: split automatically | |
| // ffprobe -f lavfi -i "movie=./video-in.mkv,blackdetect[out0]" -show_entries tags=lavfi.black_start,lavfi.black_end -of default=nw=1 -v quiet | |
| function processBlacksFile(err, contents) { | |
| const durations = contents.split('\n') | |
| .map((line) => { |
This file contains hidden or 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
| import java.net.MalformedURLException; | |
| import java.net.URI; | |
| import java.net.URISyntaxException; | |
| import java.net.URL; | |
| public class URIUtils { | |
| private static final String FAKE_ROOT = "/fakeroot/"; | |
| public URIUtils() { | |
| throw new IllegalAccessError("Utility class"); |
This file contains hidden or 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
| { | |
| "name": "who-is-going-to-smash", | |
| "version": "0.0.1", | |
| "description": "", | |
| "main": "tourney-participants.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1", | |
| "start": "node who-is-going-to-melee.js" | |
| }, | |
| "author": "David Serrano", |
This file contains hidden or 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
| { | |
| "queues": { | |
| "28295": [12045626, 12057516, 12057519, 12057520] | |
| }, | |
| "tournamentId": 38326, | |
| "data": { | |
| "entities": { | |
| "sets": [{ | |
| "id": 12045626, | |
| "eventId": 83611, |
This file contains hidden or 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 | |
| PYTHON_EXE=python | |
| DEF_PORT=8080 | |
| PORT=$1 | |
| SERV_DIR=game | |
| ABSPATH=$(cd "$(dirname "$0")"; pwd) | |
| if [ "$(uname)" == "Darwin" ]; then | |
| BROWSER=open |
This file contains hidden or 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
| # From a fresh install of squeeze | |
| apt-get install ruby rubygems # Need ruby to use fpm | |
| gem1.8 install fpm --no-ri --no-rdoc | |
| apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
| tar -zxvf ruby-1.9.3-p125.tar.gz | |
| cd ruby-1.9.3-p125 | |
| rm -rf /tmp/ruby193 |
This file contains hidden or 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
| # From a fresh install of squeeze | |
| apt-get install ruby rubygems # Need ruby to use fpm | |
| gem1.8 install fpm --no-ri --no-rdoc | |
| apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.gz | |
| tar -zxvf ruby-1.9.3-rc1.tar.gz | |
| cd ruby-1.9.3-rc1 | |
| rm -rf /tmp/ruby193 |
This file contains hidden or 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
| import sys | |
| from subprocess import call | |
| print "Running!" | |
| while True: | |
| line = sys.stdin.readline() | |
| sp = line.split(" ") | |
| if len(sp) > 2 and sp[-3] == "pressed:": | |
| k = line.split(" ")[-2] | |
| cmd = "" | |
| if (k == "left"): |
This file contains hidden or 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 | |
| # mirror.sh | |
| # Copyright (C) 2012 David Serrano | |
| # | |
| # 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 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, |
This file contains hidden or 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
| # By David Serrano aka N0_Named_Guy (@n0namedguy) | |
| # Downloads all (Linux) games to the current folder, sorted by user name | |
| # Change the code, to change your filtering needs | |
| # download it from http://www.crummy.com/software/BeautifulSoup/ | |
| from BeautifulSoup import BeautifulSoup | |
| from StringIO import StringIO | |
| import urllib, urllib2 | |
| import re,htmlentitydefs |