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
\ProvidesPackage{aak-layout} | |
\usepackage[colorlinks=true,linkcolor=blue]{hyperref} | |
\RequirePackage[ | |
textheight=0.7\paperheight, | |
textwidth =0.7\paperwidth, | |
top =0.1\paperheight, | |
bottom =0.2\paperheight, | |
left =0.1\paperwidth, |
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 pytz | |
def localize(date, time_zone): | |
"Convert the date to the local time zone (from UTC)." | |
return date.replace(second=0, microsecond=0, | |
tzinfo=pytz.utc).astimezone(pytz.timezone(time_zone)) | |
def to_utc(date, time_zone): | |
"Change a datetime corresponding to the time_zone to UTC time." |
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
(ns stopwatch.logger | |
(:use [clojure.string :only (split-lines)] | |
[stopwatch.util :only (get-log-path)]) | |
(:require [cljs.nodejs :as node])) | |
(def fs (node/require "fs")) | |
(def moment (node/require "moment")) | |
(defn- parse-datetime [date] | |
(.toDate (moment date "HH:mm \\o\\n DD.MM.YYYY"))) |
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
(defn delta-seq [xs] | |
(map | |
(fn [i] | |
(let [x (nth xs i) | |
x* (nth xs (inc i))] | |
(- x* x))) | |
(range (dec (count xs))))) |
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
(use 'hiccup.core) | |
(defn text-field | |
([field-name title] (text-field field-name title {})) | |
([field-name title {:keys [password? guide value]}] | |
(let [id (str (name field-name) "-field")] | |
[:div.field-wrapper | |
[:div.field | |
[:label {:for id} title] | |
[:input.text {:type (if password? "password" "text") |
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
var fun = (function() { | |
var self = {}; | |
self.element = (function() { | |
var self = {}; | |
self.events = (function() { | |
// Based on http://dean.edwards.name/my/events.js. | |
var self = {}; |
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
.veneer_overlay { | |
position: absolute; | |
top: 0%; | |
left: 0%; | |
width: 100%; | |
height: 100%; | |
background-color: black; | |
z-index: 1001; | |
-moz-opacity: 0.5; | |
opacity: 0.5; |
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 python2 | |
# http://bgp.he.net/AS32934#_prefixes | |
import os | |
netblocks = [ | |
"31.13.24.0/21", | |
"66.220.144.0/21", | |
"66.220.152.0/21", | |
"69.63.176.0/21", |
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
var mongo = require('mongodb'), | |
mongoStore = require('connect-mongodb'); | |
var mongo_config = { | |
host: "staff.mongohq.com", | |
port: 10004, | |
dbname: "appXXX", | |
username: "username", | |
password: "password"}; |
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
// | |
// UITextField+withFrame.h | |
// | |
#import <Foundation/Foundation.h> | |
@interface UITextField (withFrame) | |
+ (UITextField *)textFieldWithFrame:(CGRect)frame |