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 ruby | |
# Experimentally checks bibtex database for warnings. | |
# latexmk and pdflatex required | |
require 'fileutils' | |
require 'ruby-progressbar' | |
raise 'Usage: inspectbibtex.rb BIBFILE [start_citation]' unless ARGV[0] |
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
require 'open-uri' | |
require 'rkelly' | |
ast = RKelly::Parser.new.parse(open('http://mercurial.selenic.com/sources.js').read) | |
ast.pointcut(RKelly::Nodes::ArrayNode).matches[1..-1].each do |node| | |
elements = node.pointcut(RKelly::Nodes::StringNode).matches | |
if elements.any? { |v| v.value =~ /Mercurial.*MacOS.*10\.9/ } | |
puts elements[0].value[1...-1] + ' at ' + elements[2].value[1...-1] | |
end | |
end |
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 python | |
""" | |
apt-majorchanges.py | |
Find upgradable debian packages with major version changes | |
""" | |
import apt | |
__author__ = "theirix" |
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 | |
find /etc -type f | while IFS= read -r line ; do | |
[ $(echo "$line" | grep -E "^/etc/.git/") ] && continue | |
[ $(echo "$line" | grep -E "^/etc/selinux/") ] && continue | |
dlocate -S "$line" >/dev/null | |
if [ $? != 0 ] ; then | |
if [ "$(apt-file search -l \"$line\" | wc -l)" = "0" ] ; then | |
echo $line -- $(stat -c '%y' $line | cut -f1 -d' ') | |
else | |
echo $line -- dpkg miss, apt-file hit |
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 ruby | |
# | |
# Classify homebrew formulas by origins | |
def repo f | |
STDERR.print '.' | |
`brew info #{f}`.split("\n").map(&:chomp).each do |s| | |
if s =~ /^From: (.*)/ | |
return $1.gsub(/^https:\/\/github.com\/(.*)\/blob\/.*/, '\1') | |
end |
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
From 2aad6eb0337498fff3e411f514539218d686b8e5 Mon Sep 17 00:00:00 2001 | |
From: theirix <theirix@gmail.com> | |
Date: Sat, 25 Apr 2015 13:01:47 +0300 | |
Subject: [PATCH] Fixed build and runtime tidy errors | |
1. Replaced explicit TidyBuffer init with proper function call. | |
This prevents known error https://cl.ly/WwyM | |
2. Fixed runtime issue with Init/Bool tidy parameter | |
Tested with tidy 20090325 on OS X (debian uses 20091223). | |
--- |
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
From a4e8b94c553940d1a741895a3e6a54deb1f03085 Mon Sep 17 00:00:00 2001 | |
From: theirix <theirix@gmail.com> | |
Date: Sun, 3 May 2015 19:05:41 +0300 | |
Subject: [PATCH] Autodetect correct TidyBodyOnly parameter type | |
Autodetect which version (Int or Bool) should be used. | |
TidyBodyOnly has different types in different versions | |
(tidy 20061031 on OS X and 20091223 on debian). | |
--- | |
src/util.cpp | 22 +++++++++++++++++++++- |
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 ruby | |
require 'rubygems' | |
require 'xmlrpc/client' | |
require 'bencode' | |
require 'fileutils' | |
mode = :list if ARGV[0] == nil | |
if ARGV[0] == nil | |
mode = :list |
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
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.Vector; | |
public class testClass { | |
public static void main(String[] args) { | |
System.out.println("Hello World"); | |
weirdClass wc = new weirdClass(); |
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 ruby | |
require 'rubygems' | |
require 'mechanize' | |
require 'nokogiri' | |
unless ARGV.size == 2 | |
STDERR.puts "$0 trackid last-four-phone-digits" | |
exit 1 | |
end |
OlderNewer