Skip to content

Instantly share code, notes, and snippets.

View jfahrenkrug's full-sized avatar

Johannes Fahrenkrug jfahrenkrug

View GitHub Profile
javascript:var el = $$('p:nth-child(10)')[0]; var txt = el.innerHTML.replace('scenarios, environments, and conditions', 'scenarios, environments, and <a href="http://www.gourmethausstaudt.com/">bars in Redwood City</a>'); el.update(txt);
<!doctype html>
<html><head>
<title>Woof! The ASCII Dog</title>
<meta charset="utf-8">
</head><body style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
<div style="width:400;height:400;font-family:monospace;font-size:xx-small;letter-spacing:-2px;background:#FFF;line-height:0px" id="r"><span style="color:rgb(142,162,171);background:rgb(142,162,171);">ਜ</span><span style="color:rgb(142,162,171);background:rgb(142,162,171);">ਜ</span><span style="color:rgb(142,162,171);background:rgb(142,162,171);">ਜ</span><span style="color:rgb(145,165,174);background:rgb(145,165,174);">ਜ</span><span style="color:rgb(145,165,174);background:rgb(145,165,174);">ਜ</span><span style="color:rgb(149,169,176);background:rgb(149,169,176);">ਜ</span><span style="color:rgb(136,153,160);background:rgb(136,153,160);">ਜ</span><span style="color:rgb(148,165,172);background:rgb(148,165,172);">ਜ</span><span style="color:rgb(146,163,170);background:rgb(146,163,170);">ਜ</span><span style="color:rgb(149,166,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Vapor.js UTF-8 Art!</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Johannes Fahrenkrug">
<!-- Date: 2010-09-26 -->
@jfahrenkrug
jfahrenkrug / awesome_split.js
Created November 17, 2010 09:53
A SproutCore SplitView that lets you programmatically collapse views.
// ==========================================================================
// Project: ImageSearch.AwesomeSplitView
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals ImageSearch */
/** @class
(Document Your View Here)
@jfahrenkrug
jfahrenkrug / gist:797152
Created January 26, 2011 18:17
test.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Das style-Element</title>
<style type="text/css">
p { position: absolute; top: 0; left:0; padding:0px; margin: 0px; color:red; font-family:Helvetica,sans-serif; }
body { margin: 0px; padding: 0px;}
</style>
</head>
<body>
@jfahrenkrug
jfahrenkrug / wwdc2013.rb
Last active February 9, 2017 04:38
Ruby Script to check whether WWDC 2013 has been announced.
# in 2013 by Johannes Fahrenkrug, http://springenwerk.com
# See you at WWDC!
require 'rubygems'
require 'open-uri'
class WWDC2013
def self.announced?
begin
indicator_line = open('https://developer.apple.com/wwdc/') do |f|
@jfahrenkrug
jfahrenkrug / sc_many_array_test.js
Created April 19, 2011 13:36
SC.ManyArray elements can't be accessed with getPath
TP.MATest = SC.Record.extend({
});
TP.store.createRecord(TP.MATest, {name: 'Thing One'});
TP.store.createRecord(TP.MATest, {name: 'Thing Two'});
function manyArrayTest() {
// arrays
a1 = ['a', 'b', ['c', 'd']];
a2 = ['x', ['y', ['z']]];
@jfahrenkrug
jfahrenkrug / radius_test.rl
Created July 15, 2011 14:42
Test showcasing how slow the new Ragel-based Radius parser is
%%{
machine parser;
action _prefix { mark_pfx = p }
action prefix {
if data[mark_pfx..p-1] != @prefix
closing = data[mark_pfx-1,1] == '/'
@nodes.last << data[mark_pfx-(closing ? 2 : 1)..p]
fbreak;
@jfahrenkrug
jfahrenkrug / config.log
Created July 27, 2011 13:36
homebrew xapian install fail on 10.7
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xapian-core configure 1.2.4, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/xapian/1.2.4 --disable-assertions --disable-dependency-tracking
## --------- ##
## Platform. ##
If you have installed MacGPG2 via the package installer, several other
checks in this script will turn up problems, such as stray .dylibs in
/usr/local and permissions issues with share and man in /usr/local/.
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs: