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
| #DROPBOX SYNCING | |
| #============== | |
| # bash_profile | |
| rm -rf .bash_profile | |
| ln -s ~/Dropbox/.bash_profile .bash_profile | |
| # Sublime 2 Preferences | |
| cd ~/Library/Application\ Support/Sublime\ Text\ 2/ | |
| ln -s ~/Dropbox/appdata/sublime/Installed\ Packages ./Installed\ Packages |
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| // PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> |
| tell application "Safari" to set recipetitle to name of front document | |
| tell application "Safari" to set recipeurl to URL of front document | |
| set ingredients to (do shell script "curl http://recipedistiller.com/recipe/classify/?recipeurl=" & recipeurl & " | textutil -convert txt -stdin -stdout | grep '.' | sed 's/ • DELETE //g' | sed '$d'") | |
| set my text item delimiters to "VIEW RECIPE" | |
| set ingredients to text item 2 of ingredients | |
| set my text item delimiters to "©" | |
| set ingredients to text item 1 of ingredients |
| <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 ?> |
| #!/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 | |
| # |
| #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) |
| 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", |
| // | |
| // 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; |
| #!/bin/sh | |
| URLS="http://presale.events.ccc.de/ https://presale.events.ccc.de/" | |
| MAILTO="foo@example.com bar@example.org" | |
| TIMEOUT=10 | |
| for URL in $URLS; do | |
| DONEFILE=${PWD}/.urlcheckdone.$(echo ${URL} | sed -e 's/[^-[:alnum:]_]/_/g') | |
| [ -f ${DONEFILE} ] && continue |