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
var hash = new Object(); | |
var anotherHash = {}; |
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
(setq bm-restore-repository-on-load t) | |
(require 'bm) | |
;; Включаем/выключаем закладку - Alt+F5. | |
(global-set-key (kbd "<m-f5>") 'bm-toggle) | |
;; Переход на следующую закладку - F5. | |
(global-set-key (kbd "<f5>") 'bm-next) | |
;; Переход на предыдущую закладку - Shift+F5. | |
(global-set-key (kbd "<s-f5>") 'bm-previous) | |
;; Сохраняем закладки между сессиями. |
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
>> str = "This is a test string" | |
=> "This is a test string" | |
>> str1 = str.dup | |
=> "This is a test string" | |
>> str1 = "Another string" | |
=> "Another string" | |
>> str | |
=> "This is a test string" | |
>> arr = [1, 2, 3] |
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
>> arr = [[4, 5, 6], 2, 3] | |
=> [[4, 5, 6], 2, 3] | |
>> arr1 = Marshal.load(Marshal.dump(arr)) | |
=> [[4, 5, 6], 2, 3] | |
>> arr1[0] => [4, 5, 6, 7] | |
>> arr1 | |
=> [[4, 5, 6, 7], 2, 3] | |
>> arr | |
=> [[4, 5, 6], 2, 3] |
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
hash['element1'] = 'question'; | |
hash.element2 = 'baz'; | |
hash['answer'] = '42'; | |
hash.foo = 'bar'; |
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
function sum() { | |
var sum = 0; | |
for( var i =0; i < arguments.length; i++ ) { | |
sum += arguments[i]; | |
} | |
return sum; | |
} | |
sum(1,2,3,4,5); // -> 15 |
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
gemhome: /var/lib/gems/1.9 | |
gempath: | |
- /home/user/.gem/ruby/1.9 | |
- /usr/lib/ruby/gems/1.9 |
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
#!/bin/sh | |
BIN_DIR=/usr/bin | |
RUBY18_BIN_DIR=/usr/bin | |
RUBY19_BIN_DIR=/opt/ruby-1.9/bin | |
GEMS_HOME=/var/lib/gems | |
if([ -z "$1" ] || ([ "$1" != "1.8" ] && [ "$1" != "1.9" ])) | |
then | |
echo "Usage: change_ruby VERSION (1.8 or 1.9)" |
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
(global-hl-line-mode t) | |
(set-face-background 'hl-line "#1F3333") |
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
Index: GTLog.m | |
=================================================================== | |
--- GTLog.m (revision 13) | |
+++ GTLog.m (working copy) | |
@@ -905,7 +905,7 @@ | |
newLines = [[ aNotification object ] availableData ]; | |
} | |
} | |
- newLinesString = [[ NSString alloc ] initWithData: newLines encoding:NSASCIIStringEncoding ]; | |
+ newLinesString = [[ NSString alloc ] initWithData: newLines encoding:NSUTF8StringEncoding ]; |
OlderNewer