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/sh | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
CURRENT=`grep -e "^[^#]" $1` | |
if [ -z "$CURRENT" ] | |
then | |
NEW_MSG=$(echo "$BRANCH"; cat "$1") | |
echo "$NEW_MSG" > $1 | |
fi |
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
# add it to spec/spec_helper.rb | |
RSpec.configure do |config| | |
... | |
config.include TestObservers | |
... | |
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
development: | |
adapter: postgresql | |
host: localhost | |
port: 5432 | |
pool: 5 | |
encoding: unicode | |
database: | |
username: | |
password: |
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
# <div app-show-if-ready ui-view></div> | |
appShowIfReady = ($animate, $rootScope, $timeout, cfpLoadingBar) -> | |
restrict: 'A' | |
link: ($scope, $element) -> | |
container = $element.parent() | |
stateChangeStartOff = $rootScope.$on '$stateChangeStart', -> | |
container.hide() | |
stateChangeSuccessOff = $rootScope.$on '$stateChangeSuccess', -> | |
$timeout -> |
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
/* | |
* Copyright 2011 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
package | |
{ | |
import flash.display.Loader; | |
import flash.net.URLRequest; | |
import flash.net.URLStream; | |
import flash.events.IOErrorEvent; | |
import flash.events.SecurityErrorEvent; | |
import flash.events.Event; | |
import flash.utils.ByteArray; | |
import flash.utils.Endian; |
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
<?php | |
#HTMLPurifier/Filter/YoutubeIframe.php | |
class HTMLPurifier_Filter_YoutubeIframe extends HTMLPurifier_Filter | |
{ | |
public $name = 'YouTubeIframe'; | |
public function preFilter($html, $config, $context) { | |
if (strstr($html, '<iframe')) { | |
$html = str_ireplace("</iframe>", "", $html); |
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
def w(name, str = nil, &block) | |
block ||= proc { |m| sys(str % m[0])} | |
watch('^' << name.gsub('.', '\.').gsub('*', '.*')) do |m| | |
puts "-"*80, "#{Time.now.strftime("%H:%M:%S")} - file changed: \033[1;34m#{m[0]}\033[0m" | |
block[m] | |
end | |
end | |
def sys(cmd) | |
puts "\033[0;33m>>> \033[1;33m#{cmd}\033[0m" |
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 'formula' | |
def mysql_installed? | |
`which mysql_config`.length > 0 | |
end | |
class Php <Formula | |
url 'http://www.php.net/get/php-5.3.10.tar.bz2/from/this/mirror' | |
homepage 'http://php.net/' | |
md5 '816259e5ca7d0a7e943e56a3bb32b17f' |
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/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 | |
# |
OlderNewer