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
| set -g status-left-length 32 | |
| set -g status-right-length 150 | |
| set -g status-fg white | |
| set -g status-bg colour234 | |
| set -g window-status-activity-attr bold | |
| set -g pane-border-fg colour245 | |
| set -g pane-active-border-fg colour39 | |
| set -g message-fg colour16 | |
| set -g message-bg colour221 |
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' | |
| texts, marshaled_texts = [], [] | |
| n = 1_000_000 | |
| puts "Write:" | |
| Benchmark.bm(17) do |x| | |
| x.report('without marshal:') { for i in 1..n; texts << (0...8).map{(65+rand(26)).chr}.join end } | |
| x.report('with marshal:') { for i in 1..n; marshaled_texts << Marshal.dump((0...8).map{(65+rand(26)).chr}.join) end } | |
| 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
| [ec2-user@ip-10-139-147-122 ~]$ cat /proc/cpuinfo | |
| processor : 0 | |
| vendor_id : GenuineIntel | |
| cpu family : 6 | |
| model : 45 | |
| model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz | |
| stepping : 7 | |
| microcode : 0x70b | |
| cpu MHz : 2000.003 | |
| cache size : 20480 KB |
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
| rspec string_calculator_spec.rb |
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
| let NERDTreeIgnore=['\.pyc$', '\.pyo$', '\.rbc$', '\.rbo$', '\.class$', '\.o$', '\~$'] | |
| augroup AuNERDTreeCmd | |
| autocmd AuNERDTreeCmd VimEnter * call s:CdIfDirectory(expand("<amatch>")) | |
| autocmd AuNERDTreeCmd FocusGained * call s:UpdateNERDTree() | |
| " If the parameter is a directory, cd into it | |
| function s:CdIfDirectory(directory) | |
| let explicitDirectory = isdirectory(a:directory) | |
| let directory = explicitDirectory || empty(a:directory) |
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
| times = ARGV[0].to_i | |
| tries = ARGV[1].to_i | |
| times.times do | |
| sum = 0 | |
| tries.times do | |
| sum = sum + rand(1..6) | |
| end | |
| avg = sum / tries | |
| puts avg |
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
| server { | |
| listen 80; # Listen on port 80 for IPv4 requests | |
| server_name jenkins.example.com; | |
| access_log /var/log/nginx/hudson_access.log; | |
| error_log /var/log/nginx/hudson_error.log; | |
| location ~ ^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)$ { | |
| #rewrite all static files into requests to the root |
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
| # Setting the prefix from C-b to C-a | |
| # START:prefix | |
| set -g prefix C-a | |
| # END:prefix | |
| # Free the original Ctrl-b prefix keybinding | |
| # START:unbind | |
| unbind C-b | |
| # END:unbind | |
| #setting the delay between prefix and command | |
| # START:delay |
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
| set -g status-left-length 32 | |
| set -g status-right-length 150 | |
| set -g status-fg white | |
| set -g status-bg colour234 | |
| set -g window-status-activity-attr bold | |
| set -g pane-border-fg colour245 | |
| set -g pane-active-border-fg colour39 | |
| set -g message-fg colour16 | |
| set -g message-bg colour221 |
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
| FB.init({ appId: "1234", nativeInterface: CDV.FB, useCachedDialogs: false }); | |
| FB.login(function(response) { | |
| if (response.session) { | |
| alert('logged in'); | |
| } else { | |
| alert('not logged in'); | |
| } | |
| }, { scope: "publish_stream" }); | |
| FB.api('/me/feed', 'post', {message: "FooBar!}); |