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
[package] | |
name = "bk" | |
version = "0.1.0" | |
authors = ["Jan Stępień"] |
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
[package] | |
name = "phash" | |
version = "0.1.0" | |
authors = ["Jan Stępień"] | |
[dependencies] | |
libc = "0.2.36" | |
rayon = "0.9.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
;; Let's experiment with Clojure 1.8.0 running with a relatively small heap | |
;; of 10MB. To avoid any extra dependencies, we'll start it as follows: | |
;; | |
;; java -Xmx10m -jar clojure-1.8.0.jar | |
;; | |
;; Copy following expressions into your REPL one by one. | |
;; | |
;; Let's take a small number, for instance one million. | |
(def small-num (* 1000 1000)) |
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
As of the upcoming LLVM 3.1 release llvm-config has been rewritten as a | |
native executable [1]. Executing it with Perl causes the configure script | |
to fail with a message | |
Unrecognized character \x7F; marked by <-- HERE after | |
<-- HERE near column 1 at llvm-config line 1. | |
This commit makes llvm-config to be invoked directly. As a result it works | |
correctly with LLVM 3.0 and fails with a more friendly error message when | |
encountering LLVM 3.1svn. |
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
CFLAGS = $(shell pkg-config --cflags mozjs185) -O2 -Wall | |
LDFLAGS = -Wl,--as-needed -Wl,-O1 | |
LDLIBS = $(shell pkg-config --libs mozjs185) | |
all: parse | |
parse: parse.o | |
parse.o: parse.c date.js.h | |
date.js.h: date.js | |
( \ | |
echo 'const char *code =' ; \ |
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
# irb(main):001:0> cartprod [[:a, :b], (1..3), [true, false]] | |
# => [[:a, 1, true], [:a, 1, false], [:a, 2, true], [:a, 2, false], | |
# [:a, 3, true], [:a, 3, false], [:b, 1, true], [:b, 1, false], | |
# [:b, 2, true], [:b, 2, false], [:b, 3, true], [:b, 3, false]] | |
def cartprod(colls) | |
if colls.empty? | |
[[]] | |
else | |
rest_cartprod = cartprod colls[1..-1] | |
colls[0].reduce [] do |all, x| |
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
AC_DEFUN([AX_CHECK_GEMS],[ | |
AC_MSG_CHECKING([whether we've got all required gems]) | |
result=`$RUBY -e ' | |
ARGV.each { |f| begin; require f; rescue LoadError; puts(f); exit 1; end } | |
' $1 2>&1` | |
if test x = "x$result"; then | |
AC_MSG_RESULT([yes]) | |
else | |
AC_MSG_RESULT([no]) | |
AC_MSG_ERROR([cannot find $result]) |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Git; | |
use File::Basename; | |
use Date::Parse; | |
use Date::Format; | |
# States |
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/sh | |
src=/path/to/trac | |
dst=$src.tmp | |
port=54134 | |
target=$dst/localhost\:$port | |
pidfile=$dst/pid | |
set -x |
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
n=9;for i in `seq $n`; do pages=$(identify wyklad$i.pdf | tail -n 1 | perl -ne '/^wyklad.*?\[(\d+)/; $_ = $1+1; print'); sed -e s/wyklad1/wyklad$i/g -e s/23/$pages/ < slides.tex > slides$i.tex; done |
NewerOlder