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 | |
# -*- coding: UTF-8 -*- | |
import os | |
class Cleaner: | |
def __init__(self, filename, *filter_actions): | |
self.file = open(filename, 'r') | |
self.filter_actions = filter_actions |
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/sh | |
ffmpeg -i $1 -pix_fmt rgb24 output.gif | |
echo "Optimizing GIF" | |
convert -layers Optimize output.gif $2 | |
rm -f output.gif |
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 'benchmark' | |
n = 100_000 | |
with_iframe = open('with_iframe.html').read | |
without_iframe = open('without_iframe.html').read | |
Benchmark.bm do |x| | |
x.report("with_iframe, include?") do | |
n.times { with_iframe.include? "<iframe" } |
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
Have a symbolic link or the actual repositories as siblings: | |
- lang-smalltalk | |
- pypy | |
- rsdl | |
In VM repos are in /repos | |
Python path is already set up for rsdl usage. |
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
/******************************************************************************* | |
* Copyright (c) 2011, Jean-David Gadina - www.xs-labs.com | |
* Distributed under the Boost Software License, Version 1.0. | |
* | |
* Boost Software License - Version 1.0 - August 17th, 2003 | |
* | |
* Permission is hereby granted, free of charge, to any person or organization | |
* obtaining a copy of the software and accompanying documentation covered by | |
* this license (the "Software") to use, reproduce, display, distribute, | |
* execute, and transmit the Software, and to prepare derivative works of the |
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
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
-- Load Debian menu entries |
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/sh | |
URL='http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12' | |
SEARCH_STRING="mountain" | |
echo "Mountain Lion" | |
echo "Press Ctrl-C to exit." | |
echo "" | |
while true ; do | |
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" ${URL} | grep -i "${SEARCH_STRING}" > /dev/null | |
if [ "$?" == "0" ]; then | |
echo "Search string found!" |
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
prerequisites | |
============= | |
git clone git://github.com/LivelyKernel/livelykernel-scripts.git | |
(in dir <lk-scripts-repo-dir>) | |
dependencies of a node.js app | |
============================= | |
npm list --parseable | sed "s/.*\/node_modules\/\(.*\)$/\1/" | sed "s/\/.*$//" | sort | uniq |
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/local/bin/python3 | |
""" | |
Implementation of persons for a pim database | |
""" | |
import shelve | |
import tkinter | |
import tkinter.messagebox |