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
square x = x * x |
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
(defn hello [name] (str "Hello, " name)) |
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
(ns quasiquote | |
(:use clojure.test)) | |
;; ************************************** | |
;; Quasiquote from ClojureQL | |
;; http://gitorious.org/clojureql/clojureql/blobs/master/src/dk/bestinclass/clojureql/util.clj | |
;; modified to work with unquote-splicing | |
;; ************************************** |
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
;; Slightly enhanced version of Alex Osborne's debug-repl (http://gist.github.com/252421) | |
;; Typing () quits the debug REPL, making it possible to continue without terminating the | |
;; input stream by typing Ctrl-D. | |
;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
(ns debug | |
[:require clojure.main]) | |
(defmacro local-bindings |
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
# This script adds and removes .gitignore files to a Visual Studio | |
# project. It is useful when temporary versioning a project with Git. | |
# TODO: add command line handling so the user can specify -r or -a | |
# on the command line, along with the directory name to handle. | |
import sys | |
import os.path | |
import os |
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("new-tabs.js"); | |
add_delicious_webjumps("mbrezu"); | |
require("page-modes/google-search-results.js"); | |
xkcd_add_title = true; | |
google_search_bind_number_shortcuts(); | |
homepage = "about:blank"; | |
define_webjump("imdb", "http://imdb.com/find?q=%s"); | |
define_webjump("stackoverflow", "http://stackoverflow.com/search?q=%s"); | |
define_webjump("youtube", "http://www.youtube.com/results?search_query=%s&search=Search"); |
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
TODO list pentru configurat masina virtuala pentru dezvoltare ocaml | |
instalat Microsoft Visual Studio Express 2010 | |
instalat diverse | |
7zip | |
clipx | |
total commander | |
instalat Cygwin (folosind switch.ch, pare sa mearga OK) | |
mc | |
m4 |
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
# Tries to fix a srt file to match the sub time with the actual dialog time. | |
# Inputs: | |
# - the srt file | |
# - a list of (srt time, spoken dialog time) pairs that will be used | |
# to infer the parameters for the srt time adjustment | |
# Outputs: | |
# - the corrected srt file to standard output | |
# - the correction parameters to standard error | |
import sys |
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 sys | |
import re | |
import math | |
import os.path | |
class SrtEntry(object): | |
def __init__(self, number, startTime, endTime, text): | |
self.number = number | |
self.startTime = startTime | |
self.endTime = endTime |
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
(let ((cache (make-hash-table :test 'equal))) | |
(defun encode-js-identifier (identifier) | |
"Given a string, produces to a valid JavaScript identifier by | |
following transformation heuristics case conversion. For example, | |
paren-script becomes parenScript, *some-global* becomes SOMEGLOBAL." | |
(setf identifier (string-downcase identifier)) | |
(or (gethash identifier cache) | |
(setf (gethash identifier cache) | |
(let ((no-case-conversion nil) | |
(lowercase t) |
OlderNewer