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
| Albert knows the month. Bernard knows the day. | |
| May 15 May 16 May 19 | |
| Jun 17 Jun 18 | |
| Jul 14 Jul 16 | |
| Aug 14 Aug 15 Aug 17 | |
| Albert does not know the date because all months have more than one day. Albert knows that Bernard | |
| cannot know the date. Therefore, Albert knows that the month contains no uniquely identifying days. |
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
| >> a = ['a', 'a', 'b', 'c', 'c', 'c', 'd', 'd', 'e', 'f'] | |
| => ["a", "a", "b", "c", "c", "c", "d", "d", "e", "f"] | |
| >> a.each_with_object(Hash.new(0)) { |x, h| h[x] += 1 } | |
| => {"a"=>2, "b"=>1, "c"=>3, "d"=>2, "e"=>1, "f"=>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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'json' | |
| module LodestoneApi | |
| CHARACTER_URL = 'http://na.finalfantasyxiv.com/lodestone/character' |
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
| # If you are not using bash, you should take care to append the echo | |
| # lines below to the appropriate shell_profile | |
| git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| exec $SHELL -l |
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
| " turn on left and right in command mode | |
| nnoremap <Left> <Left> | |
| nnoremap <Right> <Right> | |
| " turn on arrow keys in insert mode | |
| inoremap <Left> <Left> | |
| inoremap <Down> <Down> | |
| inoremap <Up> <Up> | |
| inoremap <Right> <Right> |
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
| @namespace url(http://www.w3.org/1999/xhtml); | |
| /*** GENERAL ***/ | |
| html, .social-sign-in-separator span, .readMoreBadge__countWrapper { | |
| background: #000 !important} | |
| body, .site, .dashbox, .listenContent__inner, .sound__soundActions, .l-footer, .activity__sharingNote-container, .commentForm, .commentForm__inputWrapper, .createPlaylist:hover, .createPlaylist.focused, .uploadStatus, .activeUpload__section, .activeUpload__quietTeaser, .activeUpload__blockTable.threeCell, .autoTagger__fields, .sc-background-light, .addToPlaylistTabs .tabs__tabs, .g-modal-section, .addToPlaylistItem__actions, .createPlaylistSuggestion__addContainer, .conversation__actions, .conversation__form, .inbox__item:before, .inboxItem.active, .inboxItem:hover, .g-form-section.highlight:hover, .advancedFields__quietTeaser, .sharePanel .tabs__tabs, .embedPanel__tabLink, .manageSounds__upsellWrapper, .uploadMain__foot, .searchTitle__content { | |
| background: transparent !important} | |
| .commentForm, .commentForm__inputWrapper, .sc-button-group, . |
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 ruby | |
| # encoding: utf-8 | |
| # Task: You are given number of nodes (n) in a binary tree. | |
| # You have to tell whether it is possible having a tree with given number of nodes | |
| # such that all nodes at all levels have 2 children (except the last level). | |
| num_nodes = ARGV[0].to_i | |
| total = 0 | |
| row = 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
| [user] | |
| email = guy@example.com | |
| name = That Guy | |
| [push] | |
| default = matching | |
| [alias] | |
| tree = log --graph --decorate --pretty=oneline --abbrev-commit | |
| [hub] | |
| protocol = https | |
| [core] |
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
| # add this to your .bashrc (or whatever is appropriate for your shell flavor of preference) to | |
| # automatically set up rbenv when a new session is started | |
| export PATH="$HOME/.rbenv/bin:$PATH" | |
| eval "$(rbenv init -)" |
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
| Windows Registry Editor Version 5.00 | |
| ; Removes 'Open in Atom' from the context menu. | |
| ; windows-context-menu | |
| [-HKEY_CLASSES_ROOT\*\shell\Open File in Atom] | |
| [-HKEY_CLASSES_ROOT\Directory\shell\Open Folder in Atom] | |
| [-HKEY_CLASSES_ROOT\Directory\Background\shell\Open Folder in Atom] | |
| [-HKEY_CLASSES_ROOT\LibraryFolder\Background\shell\Open Folder in Atom] |