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
#! /bin/sh | |
do_icon() { | |
PLATFORM=$1 | |
WIDTH=$2 | |
FILENAME=$3 | |
echo 'Generating icon: '${FILENAME}'.png' | |
magick "resources/icon.png" -resize ${WIDTH}x${WIDTH} \ | |
"resources/"${PLATFORM}"/icon/"${FILENAME}".png" | |
} |
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
var absolutePaths = function() | |
{ | |
var i, links = document.body.getElementsByTagName('a'); | |
for (i = 0; i < links.length; i++) { | |
links[i].href = links[i].protocol + "//" + links[i].host + | |
links[i].pathname + links[i].search + links[i].hash; | |
} | |
} |
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
(function() { | |
var article = document.body.getElementsByTagName("article"); | |
if (article.length != 1) | |
return false; | |
article = article[0]; | |
var container = document.getElementById("toc"); | |
if (!container) { | |
container = document.createElement("nav"); |
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
<?php | |
/* What PHP gives us */ | |
public function fubar($bar, $foo = 'banans', $baz = 'bananas') | |
{ | |
/* | |
* Function definition code using $foo, $bar and $baz goes here | |
*/ | |
} | |
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
posts[0] = json_add_object(NULL, | |
json_add_string("anchor" , "fancy-post"), | |
json_add_string("url" , "fancy-post"), | |
json_add_string("title" , "Fancy Post"), | |
json_add_string("datetime" ,"2014-01-15"), | |
json_add_string("date" , "2014-01-15"), | |
json_add_string("body" , "hoooraaaay, blog post!"), | |
NULL); | |
posts[1] = NULL; | |
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
int test_markdown(char *file) | |
{ | |
hoedown_buffer *ib, *ob; | |
FILE *in = stdin; | |
hoedown_renderer *renderer; | |
hoedown_markdown *markdown; | |
in = fopen(file, "r"); | |
if (!in) { |
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
char tags[128]; | |
char *tmp = tags, *tok = NULL, *foo[123]; | |
int i = 0, noftags = 0; | |
printf("Tags (separate by commas): "); | |
fgets(tags, sizeof(tags), stdin); | |
tok = strtok(&tmp[0], ","); | |
while (tok) { | |
trim(tok); |
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
// Copyright (c) Sergey Lyubka, 2013. | |
// All rights reserved. | |
// This program is used to embed arbitrary data into a C binary. It takes | |
// a list of files as an input, and produces a .c data file that contains | |
// contents of all these files as collection of char arrays. | |
// Usage: | |
// 1. Compile this file: | |
// cc -o embed embed.c | |
// |
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
Title: | |
Font: Amble | |
License: Apache License, Version 2.0 | |
Author: Punchcut | |
URL: http://punchcut.com/ | http://www.fontsquirrel.com/fonts/amble | |
Body: | |
Font: Bitter | |
License: SIL Open Font License, Version 1.1. | |
Author: Huerta Tipografica |
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
/*! | |
* Davis - http://davisjs.com - JavaScript Routing - 0.9.9 | |
* Copyright (C) 2011 Oliver Nightingale | |
* MIT Licensed | |
* | |
* Convinience method for instantiating a new Davis app and configuring it to use the passed | |
* routes and subscriptions. | |
* | |
* @param {Function} config A function that will be run with a newly created Davis.App as its context, | |
* should be used to set up app routes, subscriptions and settings etc. |
NewerOlder