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 FizzBuzz | |
| def self.run | |
| # your solution goes here | |
| # use "puts" to print out a number, "fizz", or "buzz" | |
| (1..100).each do |n| | |
| output = "" | |
| output += "Fizz" if (n%3).zero? | |
| output += "Buzz" if (n%5).zero? | |
| puts output.empty? ? n : output | |
| 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
| puts $$ | |
| children = [] | |
| list = [1,2] | |
| list.each do |i| | |
| pid = fork { | |
| puts i | |
| loop do | |
| print '.' | |
| sleep 0.5 | |
| 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
| /* | |
| Errno::ENOENT: No such file or directory - getcwd | |
| Backtrace: | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/importers/filesystem.rb:16:in `expand_path' | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/importers/filesystem.rb:16:in `initialize' | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/engine.rb:153:in `new' | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/engine.rb:153:in `normalize_options' | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/engine.rb:228:in `initialize' | |
| /home/webadmit/.rvm/gems/ruby-1.9.2-p290@webadmit/gems/sass-3.1.7/lib/sass/engine.rb:201:in `new' |
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
| #!/usr/bin/env bash | |
| git reset --soft HEAD~1 |
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
| # mkick.rb | |
| # | |
| # Mass-kicks users in a channel | |
| # | |
| # http://scripts.irssi.org/html/mkick.pl.html | |
| # | |
| # Possible inspiration: http://weechat.org/files/scripts/unofficial/chanlist.rb | |
| # | |
| # Usage: /mkick <channel> <kick message> |
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
| # Maintainer: Joseph Hsu <jhsu.x1@gmail.com> | |
| pkgname=bdsm-git | |
| pkgver=20110418 | |
| pkgrel=1 | |
| pkgdesc="SM :: S{cripting,ystem,tack} Management (SM) Framework (Core)" | |
| arch=('i686' 'x86_64') | |
| url="https://sm.beginrescueend.com/" | |
| license=("Apache License, Version 2.0") | |
| depends=("bash") | |
| makedepends=("git") |
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
| rvm use 1.8.7 |
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
| flip: (╯°□°)╯︵ ┻━┻ |
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
| ruby-1.9.2-p180 :019 > CSV.parse("this is some,b0rken \"csv\"") | |
| #=> CSV::MalformedCSVError: Illegal quoting on line 1. |
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
| module PluginHelper | |
| module ClassMethods | |
| attr_accessor :commands | |
| def user_commands(*cmds) | |
| @commands = cmds | |
| end | |
| end | |
| def self.included(base) | |
| base.extend(ClassMethods) |