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
// Mathias Bynens' optimized Google Universal Analytics snippet. | |
// http://mathiasbynens.be/notes/async-analytics-snippet | |
(function(window, document, variableName, scriptElement, firstScript) { | |
window['GoogleAnalyticsObject'] = variableName; | |
window[variableName] || (window[variableName] = function() { | |
(window[variableName].q = window[variableName].q || []).push(arguments); | |
}); | |
window[variableName].l = +new Date; | |
scriptElement = document.createElement('script'), | |
firstScript = document.scripts[0]; |
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
source "https://rubygems.org" | |
gem "sass" |
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
OUTPUT_DIR := build | |
SOURCES_DIR := styles | |
DEPS_DIR := .deps | |
RM := rm -rf | |
RUBY := ruby | |
SASS := scss | |
SASS_OPTIONS := --unix-newlines | |
SASS_OPTIONS += --style compressed | |
SASS_OPTIONS += --precision 8 |
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
local-time |
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
#include <stdio.h> | |
#include <string.h> | |
#include <openssl/sha.h> | |
// gcc -o sha1 sha1.c -lcrypto | |
int main(void) { | |
const unsigned char ibuf[] = "compute sha1"; | |
unsigned char obuf[20]; |
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 java.time.Duration; | |
import java.time.ZonedDateTime; | |
import java.time.format.DateTimeFormatter; | |
public class Java8DateTimeApiExample { | |
public static void main(String[] args) { | |
ZonedDateTime now = ZonedDateTime.now(); | |
int daysOffset = (int) (Math.random() * 10) + 1; |
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
<script src="moment.js"></script> | |
<script src="de.js"></script> | |
<script> | |
(function(){ | |
var timestamp = document.querySelector("[data-timestamp]"); | |
timestamp.innerHTML = moment.unix(timestamp.getAttribute("data-timestamp")).format("dddd, Do MMMM YYYY, H:mm:ss"); | |
}()) | |
</script> |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
# Number of digits after the dot to be output in the CSS rule. | |
PRECISION = 8 | |
def generate_grid(columns, className, collapseThreshold=1): | |
""" | |
Generates CSS code for a grid system. | |
columns - The number of columns the grid consists of. |

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
#include <stdio.h> | |
#include <inttypes.h> | |
int gcd(int a, int b) { | |
return b == 0 ? a : gcd(b, a - (((int) (a / b)) * b)); | |
} | |
int main(int argc, char const *argv[]) { | |
if (argc >= 3) { | |
const unsigned short pairs = (argc - 1) / 2; |