Skip to content

Instantly share code, notes, and snippets.

@clairvy
clairvy / a.pl
Created September 8, 2010 12:39
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use lib qq($FindBin::Bin/lib);
use Data::Dumper;
# preapare table
@clairvy
clairvy / _git
Created September 8, 2010 07:45
#compdef git git-add git-am git-annotate git-apply git-applymbox git-applypatch git-archimport git-archive git-bisect git-blame git-branch git-cat-file git-check-attr git-check-ref-format git-checkout git-checkout-index git-cherry git-cherry-pick git-clean git-clone git-clone-pack git-commit git-commit-tree git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport git-cvsserver git-daemon git-describe git-diff git-diff-files git-diff-index git-diff-stages git-diff-tree git-fast-import git-fetch git-fetch-pack git-fmt-merge-msg git-for-each-ref git-format-patch git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-http-fetch git-http-push git-imap-send git-index-pack git-init git-instaweb git-local-fetch git-log git-lost-found git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-one-file git-merge-tree git-mergetool git-mktag git-mktree git-mv git-name-rev git-pack-objects git-pack-redundant git-pack-refs
# php oneliner
function phpv () {
local B
local e
while getopts 'B:e:' opt; do
case $opt in
B) B=$OPTARG;;
e) e=$OPTARG;;
esac
done
#!/usr/bin/perl
# Author: Todd Larason <[email protected]>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
#!/usr/bin/perl
# Author: Todd Larason <[email protected]>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
;; This config was generated using ensime-config-gen. Feel free to customize its contents manually.
(
:server-root "/usr/local/ensime/"
:project-package "com.myexample"
:use-sbt t
# scala oneliner
function scall () {
local f
while getopts 'e:B:E:' opt; do
case $opt in
B) B=$OPTARG;;
E) E=$OPTARG;;
e) f=$OPTARG;;
esac
done
object Main extends Application {
println("zero: " + zero(0)(i => i +1))
println("one: " + succ[Int](zero)(0)(i => i + 1))
def zero[A](i : A) = (f : A => A) => i
def succ[A](n : A=>(A=>A)=>A) = (i:A)=>(f:A=>A)=>f(n(i)(f))
}
default: check
check : a.v
coqc a.v
a.v : Theorems.v
( cat Theorems.v ; echo ; echo 'Definition check_Modus_ponens: forall (P Q: Prop), (P -> Q) -> P -> Q := Modus_ponens.' ) > a.v
clean:
$(RM) $(RMF) a.v a.glob a.vo
#!/usr/bin/env perl
use CGI;
use MIME::Base64;
use DBI;
use utf8;
$q = new CGI;
$dbname = "trinity777";
$user = "root";