This file contains hidden or 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
# m.clickjogos | |
if ($http_user_agent ~ (^Fly|^htc|^HTC|^Huawei|^HUAWEI|^INQ|^LENOVO|^LG|^MAUI|^mot-|^MOT|^nokia|^NOKIA|^NEC|^Openwave| | |
^OPENWAVE|^samsung|^SEC|^sgh|^SPH-|^SIE|^Xda|^ZTE|ACS-NF|Amoi|Android|Alcatel|BenQ|BENQ|BlackBerry| | |
Cellphone|DoCoMo|ericsson|Ericsson|HTC|Hutchison|imode|iPAQ|iPhone|LGE|Maemo|Maui\ Browser|MAUI\ WAP| | |
MIDP|Mitsu|Mobi|mobile|Mobile|Motorola|NetFront|Netfront|Nintendo\ DSi|nokia|Nokia|Obigo|Palm| | |
Panasonic|PHILIPS|Phone|PlayStation\ Portable|portalmmm|SAGEM|SAMSUNG|Samsung|SANYO|Sanyo|SCH\-|Sendo| | |
SHARP|Smartphone|SmartPhone|Symbian\ OS|SymbianOS|Teleca|Toshiba|UP\.Browser|Vodafone|webOS|wap|WAP|Windows\ CE) ) { | |
rewrite ^(.*) http://m.clickjogos.uol.com.br/ permanent; | |
} |
This file contains hidden or 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
RewriteCond %{HTTP_USER_AGENT} ^Fly [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^htc [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^HTC [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^Huawei [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^HUAWEI [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^INQ [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^LENOVO [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^LG [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^MAUI [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} ^mot- [NC,OR] |
This file contains hidden or 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
yaml = YAML.load_file("#{Rails.root}/config/shopping.yml") | |
yaml.each do |tab, products| | |
products.each do |a, values| | |
tab_name = tab.gsub ' ', '_' | |
name = values.first.gsub ' ', '' | |
link = values.last | |
puts "#{tab_name}: #{name}" | |
puts "http://clicklogger.rm.uol.com.br/shopping/?prd=239&grp=skin:clickjogos;src:14;size:19;chn:102;pos:4;thm:#{tab_name};creative:#{name}&msr=Cliques%20de%20Origem:1&oper=11&redir=#{ link }" | |
puts |
This file contains hidden or 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
% Facts | |
parent(dirce, gislene). | |
parent(dirce, irair). | |
parent(valdemar, gislene). | |
parent(valdemar, irair). | |
parent(gislene, alexandre). | |
parent(gislene, fakebrother). | |
parent(irair, fernando). | |
% Rules |
This file contains hidden or 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
{ | |
"auto_complete": false, | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", |
This file contains hidden or 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
!!! 5 | |
%html | |
%head | |
%title= "Your Website" | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%meta{ :content => "3 days", :name => "revisit-after" } | |
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" } | |
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" } | |
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" } |
This file contains hidden or 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
App.Router.reopen | |
location: 'history' | |
enableLogging: true | |
App.Router.map -> | |
@resource 'admin', -> | |
@resource 'wallpapers', -> | |
@route 'new' | |
App.AdminRoute = Ember.Route.extend |
This file contains hidden or 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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/" | |
} | |
export PS1='\[\e[1;37m\]\w\[\e[m\] $(parse_git_branch "(%s)" ) \[\e[1;32m\]\$ \[\e[m\]\[\e[1;37m\]' | |
export EDITOR=nano |
This file contains hidden or 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
#For jpeg files | |
#Need to install jpegtran in ubuntu | |
sudo apt-get install libjpeg-progs | |
Usage tips: | |
#To optimise a single jpeg image: | |
jpegtran -copy none -optimise -outfile image.jpg image.jpg | |
#To optimise all jpegs in the current directory: | |
for img in `ls *.jpg`; do jpegtran -copy none -optimise -outfile $img $img; done |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |