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(window){ | |
| add_pic = function (options) { | |
| $('#pic').append("<img href='http://google.com/logo.jpg'/>"); | |
| }; |
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_commit_on_tab": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "solid", | |
| "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
| "create_window_at_startup": false, | |
| "dictionary": "Packages/Language - English/en_GB.dic", | |
| "ensure_newline_at_eof_on_save": true, | |
| "file_exclude_patterns": | |
| [ |
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
| install-bunder-gem: | |
| cmd.run: | |
| - name: gem install bundler | |
| - shell: /bin/bash | |
| - user: corn | |
| - onlyif: which ruby | grep rbenv | |
| - require: | |
| - pkg: rbenv-deps |
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.map(function() { | |
| this.resource('post', { path: '/posts/:post_id' }); | |
| }); | |
| App.PostRoute = Ember.Route.extend({ | |
| model: function(params) { | |
| return App.Post.find({hash: params.post_some_attr}); | |
| } | |
| }); |
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
| # Reset | |
| Color_Off='\e[0m' # Text Reset | |
| # Regular Colors | |
| Black='\e[0;30m' # Black | |
| Red='\e[0;31m' # Red | |
| Green='\e[0;32m' # Green | |
| Yellow='\e[0;33m' # Yellow | |
| Blue='\e[0;34m' # Blue | |
| Purple='\e[0;35m' # Purple |
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
| /* global */ | |
| @import "5grid/core.css" | |
| @import "style" | |
| /* Large desktop */ | |
| @media (min-width: 1200px) | |
| @import "5grid/core-1200px.css" | |
| @import "style-1000px.css" | |
| /* Portrait tablet to landscape and desktop */ |
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
| require 'benchmark' | |
| n = 500 | |
| archs = ["i486", "ia64"] | |
| archs.each do |arch| | |
| Benchmark.bm(7) do |x| | |
| x.report("case : #{arch}") { n.times { case arch when /i\d86/ then "i386" else arch end }} | |
| x.report("if (match): #{arch}") { n.times { if (arch.match(/i\d86/)) then "i386" else arch end }} |
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
| def spook(_a, &block) | |
| if _a == 1 | |
| puts "BOUYAH" | |
| else | |
| yield | |
| end | |
| end | |
| [1,2].each do |i| | |
| spook i do |
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
| - "N'hesitez pas à venir discuter" ('do not hesitate to come and talk with us') | |
| - "N'hesitez pas à venir nous saluer" ("do not hesitate to come and say hi to us") might be better | |
| more imperative : | |
| - "Venez nous dire bonjour" ("Come say hi") | |
| - "Venez discuter avec nous" ("Come talk to us !") | |
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
| # encoding : utf-8 | |
| require 'openssl' | |
| require 'digest/sha1' | |
| require 'base64' | |
| module Aws | |
| extend self | |
| def signed_url(path, expire_date) | |
| digest = OpenSSL::Digest::Digest.new('sha1') | |
| can_string = "GET\n\n\n#{expire_date}\n/#{S3_BUCKET}/#{path}" |