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
| http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ |
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
| #Error: | |
| gem install rmagick -v '2.13.2' 5 ↵ | |
| Building native extensions. This could take a while... | |
| ERROR: Error installing rmagick: | |
| ERROR: Failed to build gem native extension. | |
| /Users/xxxx/.rbenv/versions/1.9.3-p484/bin/ruby extconf.rb | |
| checking for Ruby version >= 1.8.5... yes | |
| checking for gcc... yes |
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
| #Error: | |
| .rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/nokogiri-1.5.10/lib/nokogiri/nokogiri.bundle: dlopen(/Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/nokogiri-1.5.10/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /opt/local/lib/libiconv.2.dylib ( LoadError) | |
| Referenced from: /Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/nokogiri-1.5.10/lib/nokogiri/nokogiri.bundle | |
| Reason: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0 - /Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/nokogiri-1.5.10/lib/nokogiri/nokogiri.bundle | |
| from /Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/nokogiri-1.5.10/lib/nokogiri.rb:28 | |
| from /Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/data-loader-2.1.0/lib/data_loader/fast/fast_server.rb:3:in `require' | |
| from /Users/zjzhai/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/data-loader-2.1.0/lib/ |
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 whenever | |
| gem install whenever | |
| #init whenever to your code base, will generate "./config/schedule.rb" | |
| whenever . | |
| #example schedule.rb | |
| every 3.hours do | |
| runner "MyModel.some_process" | |
| rake "my:rake:task" |
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
| ─zjzhai@zjzhai-2.local ~/tmp/hola | |
| ╰─➤ gem build hola.gemspec | |
| WARNING: licenses is empty | |
| WARNING: bin/hola is not executable | |
| WARNING: no email specified | |
| WARNING: no homepage specified | |
| Successfully built RubyGem | |
| Name: hola | |
| Version: 0.0.0 | |
| File: hola-0.0.0.gem |
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
| mysql -uroot -e "show databases" | grep -v Database | grep -v mysql| grep -v information_schema| grep -v test | grep -v OLD |gawk '{print "drop database " $1 ";select sleep(0.1);"}' | mysql -uroot |
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
| class Integer | |
| def to_roman | |
| # TODO Must bigger than 0 | |
| # TODO just valid to less than 3999 | |
| result = "" | |
| for i in 1..self | |
| result += "I" | |
| result.gsub! /IXI$/, "X" | |
| result.gsub! /VI{4}$/, "IX" | |
| result.gsub! /IVI$/, "V" |
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
| cat > ~/.msf4/msfconsole.rc << EOF | |
| db_connect -y /usr/local/share/metasploit-framework/config/database.yml | |
| workspace -a da | |
| EOF |
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
| #include <stdio.h> | |
| #define Bool int | |
| #define TRUE 1 | |
| #define FALSE 0 | |
| int char_count_in_str(char* str); | |
| Bool is_palindrome(char* str); | |
| int main(void){ | |
| char str[50] = {'\0'}; |
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 'rake' | |
| require 'rspec/core/rake_task' | |
| RSpec::Core::RakeTask.new(:spec) | |
| task :default => :spec |