A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
# Latex files | |
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr |
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
# config/initializers/redcarpet.rb | |
class ActionView::Template | |
class Redcarpet < Handler | |
include Handlers::Compilable | |
def compile template | |
::Redcarpet.new(template.source).to_html.inspect | |
end | |
end |
#!/bin/sh | |
URLS="http://presale.events.ccc.de/ https://presale.events.ccc.de/" | |
MAILTO="[email protected] [email protected]" | |
TIMEOUT=10 | |
for URL in $URLS; do | |
DONEFILE=${PWD}/.urlcheckdone.$(echo ${URL} | sed -e 's/[^-[:alnum:]_]/_/g') | |
[ -f ${DONEFILE} ] && continue |
// | |
// MNDocumentConflictResolutionViewController.h | |
// MindNodeTouch | |
// | |
// Created by Markus Müller on 15.12.11. | |
// Copyright (c) 2011 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@class MNDocumentReference; |
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
<div class="nav prevnext"> | |
<? if($page->hasPrevVisible()): ?> | |
<a class="prev" href="<?= $page->prevVisible()->url() ?>">‹ previous article (<?php echo html($page->prevVisible()->title()) ?>)</a> | |
<? endif ?> | |
<? if($page->hasNextVisible()): ?> | |
<a class="next" href="<?= $page->nextVisible()->url() ?>">next article › (<?php echo html($page->nextVisible()->title()) ?>)</a> | |
<? endif ?> |