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
module Jekyll | |
module Filters | |
def summarize(str, splitstr = /\s*<div id="extended">/) | |
str.split(splitstr)[0] | |
end | |
end | |
end |
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/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like. | |
module Tty extend self | |
def blue; bold 34; end | |
def white; bold 39; end | |
def red; underline 31; end | |
def reset; escape 0; end | |
def bold n; escape "1;#{n}" end |
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 file is originally from: http://snippets.dzone.com/posts/show/3714 by user `jnewland` | |
## Instructions by jnewland: | |
## | |
## Run this once with the lines uncommented to create the DB, then slap it in your crontab. | |
## | |
## That's it! | |
require 'rubygems' |
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
jerry@pi:/tmp/redis-2.4.15$ make -j 2 | |
cd src && make all | |
make[1]: Entering directory `/tmp/redis-2.4.15/src' | |
MAKE hiredis | |
MAKE jemalloc | |
make[2]: Entering directory `/tmp/redis-2.4.15/deps/hiredis' | |
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c | |
checking for xsltproc... no | |
checking for gcc... gcc | |
checking whether the C compiler works... yes |
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 "net/https" | |
url = URI.parse("https://api.pushover.net/1/messages") | |
req = Net::HTTP::Post.new(url.path) | |
req.set_form_data({ | |
:token => "abc123", | |
:user => "user123", | |
:message => "hello world", | |
}) | |
res = Net::HTTP.new(url.host, url.port) |
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/bash | |
# Distributed under the terms of the BSD License. | |
# Copyright (c) 2012 Phil Cryer phil@philcryer.com | |
# Source https://gist.github.com/gists/3333039 | |
# DESCRIPTION: | |
# This code updates OpenELEC on Raspberry PI to any available dev version you want | |
# The script to install the latest version did install the latest, but then failed to run :( | |
# This script allowed me to try another version (a few days older), which worked :) |
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
<html> | |
<head> | |
<title> | |
{{#text.title}} | |
{{text.title}} | |
{{/text.title}} | |
{{^text.title}} | |
{{title}} | |
{{/text.title}} {{#single_event}} - {{name}}{{/single_event}} - webe.at</title> | |
</head> |
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
<!DOCTYPE html> | |
<! -- | |
A very basic example in Javascript of how to attach a file to a CouchDB document. This will work wether or not the Document ID you define exists. | |
Log in at /_utils, upload this file to a document, and then view it for your own uploader. See the code for comments. ajaxSubmit() is the magic that attaches | |
as long as the Couch Doc exists because you can't submit a new Couch Document with an attachment. | |
by @rjsteinert http://rjsteinert.com | |
--> | |
<html xmlns="http://www.w3.org/1999/xhtml"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js webgl - geometry - minecraft - ao</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
color: #61443e; | |
font-family:Monospace; |
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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title> | |
{{#text.title}}{{text.title}}{{/text.title}}{{^text.title}} | |
{{title}} | |
{{/text.title}} {{#single_event}} - {{name}}{{/single_event}} - webe.at | |
</title> | |
<meta name="text:title" value=""> |