This file contains 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
> update-alternatives | |
alternatives version 1.3.49.3 - Copyright (C) 2001 Red Hat, Inc. | |
This may be freely redistributed under the terms of the GNU Public License. | |
usage: alternatives --install <link> <name> <path> <priority> | |
[--initscript <service>] | |
[--slave <link> <name> <path>]* | |
alternatives --remove <name> <path> | |
alternatives --auto <name> | |
alternatives --config <name> |
This file contains 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
[00:49] <havenwood> Godd2: Try?: update-alternatives | |
[00:50] <Godd2> https://gist.github.com/nicklink483/6017977 | |
[00:50] <bnagy> 2.6.32 %( | |
[00:50] <bnagy> holy crap I hope that's centos or something | |
[00:51] <Godd2> Well I'll tell you the problem I'm having right now. I keep getting htis error: no such file to load -- bundler | |
[00:51] <Godd2> But I have bundler installed, so I thought maybe it jjust wasn't looking in the right place | |
[00:54] <Godd2> I think I'll just give up and wait until they decide to update Ruby |
This file contains 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
file = File.new("testfile.txt", "r") | |
file.pos | |
=> 0 | |
file.gets | |
=> "This is line one\n" | |
file.pos | |
=> 18 |
This file contains 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
file = File.new("test.wav", "r") | |
file.pos | |
=> 0 | |
file.getc | |
=> "R" | |
# So far so good. wav files should begin with "RIFF" | |
file.pos | |
=> 6722 | |
# Whaaa...?? Why isn't the position at 1? If I run file.getc again I SHOULD get teh next character "I", no? |
This file contains 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 pos_text.rb | |
First position: 0 | |
Got character: R | |
Final position: 6722 |
This file contains 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 pos_test.rb | |
First position: 0 | |
Got byte: 82 | |
Final position: 6722 |
This file contains 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 pos_test.rb | |
First position: 0 | |
Got char: R | |
Second position: 6722 | |
Got char: █ | |
Final position: 14678 |
This file contains 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 pos_test.rb | |
First position: 0 | |
Got char: R | |
Second position: 1 | |
Got char: I | |
Final position: 2 |
This file contains 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 chunk_test.rb | |
"RIFF" <270568> ( "AVI " <LIST> <LIST> <JUNK> <LIST> <idx1> ) |
This file contains 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 introduction(age, sex, *names) | |
> temp = *names.join | |
> puts *names.join.class | |
> puts temp.class | |
> #these should be the same, no? | |
> end | |
=> nil | |
> introduction(13, "Male", "Sid", "Samuel", "Smith") | |
String | |
Array |