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 times, os | |
"TZ".putEnv("CET") | |
var time = getTime().getLocalTime | |
echo((time.hour.float * (1000.0 / 24.0)) + | |
(time.minute.float * (1000.0 / 1440.0)) + | |
(time.second.float * (1000.0 / 86400.0))) |
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
require 'ramaze' | |
class Main < Ramaze::Controller | |
layout :html5 | |
def index | |
%q( | |
<form method="post" action="#{r :result}"> | |
<input type="text" name="foo"> | |
<input type="submit"> |
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
# Contributor: Friedrich Weber <[email protected]> | |
# Contributor: Michael Fellinger <[email protected]> | |
pkgname=reia-git | |
pkgver=20101216 | |
pkgrel=2 | |
pkgdesc="A Ruby/Python-like scripting language for the Erlang virtual machine (BEAM)" | |
arch=('any') | |
url="http://reia-lang.org/" | |
license=('MIT') | |
depends=('erlang') |
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
require 'treetop' | |
grammar = Treetop.load_from_string(DATA.read) | |
parser = MyGrammarParser.new | |
p parser.parse(" a = 1 \n b = 2 \n").value | |
__END__ | |
grammar MyGrammar | |
rule main | |
pair* { |
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
# Encoding: BINARY | |
require "digest/md5" | |
abort "usage #$0 path1 [path2] [path3] ..." if ARGV.empty? | |
hashes = Hash.new{|h,k| h[k] = [] } | |
roots = ARGV.map{|arg| File.expand_path(arg) }.uniq | |
roots.each do |root| | |
glob = File.join(root, '/**/*') |
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
require 'ostruct' | |
require 'benchmark' | |
N = 200_000 | |
string = "Hello, Kitty" | |
o = OpenStruct.new(hello: string) | |
S = Struct.new(:hello) | |
s = S.new(string) |
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 | |
#---------------------------------------------------- | |
# Version: 0.2.4.0 | |
# Author: Florian "Bluewind" Pritz <[email protected]> | |
# | |
# Licensed under WTFPL v2 | |
# (see COPYING for full license text) | |
#--------------------------------------------------- | |
# Extract an archive based on the mime type | |
#---------------------------------------------------- |
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
open Printf | |
open String | |
let bottles n = match n with | |
| 0 -> "no more bottles of beer" | |
| 1 -> "1 bottle of beer" | |
| n -> sprintf "%d bottles of beer" n | |
;; | |
let rec song n = match n with |
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
# Contributor: unexist <[email protected]> | |
# Contributor: Xilon <[email protected]> | |
pkgname="subtle-hg" | |
pkgver=2222 | |
pkgrel=1 | |
pkgdesc="A grid-based manual tiling window manager with a strong focus on easy but customizable look and feel" | |
arch=("i686" "x86_64") | |
url="http://subtle.subforge.org" | |
license=("GPL") | |
depends=("libx11" "ruby" "ruby-curb" "ruby-minitar") |
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
# Battery sublet file | |
# Created with sur-0.1 | |
configure :battery do |s| | |
s.interval = 60 | |
s.full = 0 | |
# Path | |
s.now = [] | |
s.status = [] |