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
| var hash = new Object(); | |
| var anotherHash = {}; |
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
| var hash = {"element1": "value2", | |
| "element2": "value2", | |
| "testKey": "testValue"}; |
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
| hash['element1'] = 'question'; | |
| hash.element2 = 'baz'; | |
| hash['answer'] = '42'; | |
| hash.foo = 'bar'; |
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
| for( var item in hash ) { | |
| alert(hash[item]); | |
| } |
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
| 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 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
| #!/bin/sh | |
| RUBY19_HOME=/opt/ruby-1.9 | |
| $RUBY19_HOME/bin/gem1.9.original --config-file ~/.gemrc1.9 $@ | |
| exit $? |
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
| gemhome: /var/lib/gems/1.9 | |
| gempath: | |
| - /home/user/.gem/ruby/1.9 | |
| - /usr/lib/ruby/gems/1.9 |
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
| #!/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 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
| (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 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
| (global-hl-line-mode t) | |
| (set-face-background 'hl-line "#1F3333") |
OlderNewer