Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮

Joseph Chiocchi yyolk

🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮
View GitHub Profile
@yyolk
yyolk / summarize.rb
Created September 7, 2011 07:29 — forked from mat813/summarize.rb
Jekyll filter for summary text between two <!-- CUT --> tags
module Jekyll
module Filters
def summarize(str, splitstr = /\s*<div id="extended">/)
str.split(splitstr)[0]
end
end
end
@boyonwheels
boyonwheels / install_homebrew.rb
Created October 28, 2011 23:18 — forked from mxcl/install_homebrew.markdown
Install sceaga's PPC branch of Homebrew to /usr/local so you don't need sudo to `brew install`
#!/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
@yyolk
yyolk / bot.rb
Created March 3, 2012 01:50
RSS Twitter Bot
##
## 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'
@JerrySievert
JerrySievert / make
Created July 18, 2012 03:40
Redis on Raspberry Pi
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
@milligramme
milligramme / pushover.rb
Created July 23, 2012 18:25
pushover ruby sample
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)
@philcryer
philcryer / rpi-openelecup.sh
Last active October 8, 2015 12:38
Raspberry PI OpenELEC updater
#!/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 :)
@ryderr
ryderr / gist:4049290
Created November 10, 2012 00:47
3 col webe.at theme im workin on
<html>
<head>
<title>
{{#text.title}}
{{text.title}}
{{/text.title}}
{{^text.title}}
{{title}}
{{/text.title}} {{#single_event}} - {{name}}{{/single_event}} - webe.at</title>
</head>
@rjcorwin
rjcorwin / simple-file-attachment-for-couchdb.html
Created November 14, 2012 20:03
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.
<!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">
@mrdoob
mrdoob / gist:4078432
Created November 15, 2012 12:36
Prettier Minecraft Vertex Colors AO.
<!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;
@ryderr
ryderr / raw2.html
Created November 27, 2012 21:24
raw webe.at theme2
<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="">