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
# Bind to backtick | |
unbind C-b | |
set-option -g prefix ` | |
bind ` send-prefix | |
# Start numbering at 1 | |
set -g base-index 1 | |
# Allows for faster key repetition | |
set -s escape-time 0 |
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
{"lastUpload":"2019-01-31T01:19:15.456Z","extensionVersion":"v3.2.4"} |
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
// Give the humble javascript number the ability to generate an (ascending) range, like in ruby | |
Object.defineProperty(Number.prototype, '..', { | |
value: function *getDots(n) { | |
let i = this | |
while(i <= n) { | |
yield i++ | |
} | |
} | |
}) |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
class Game | |
attr_reader :size, :board | |
def initialize(size=10, board = Array.new(size) { Array.new(size) {Cell.new}} ) | |
@size = size | |
@board = board | |
@directions = [[-1,-1],[-1,0],[-1,1],[0,1],[1,1],[1,0],[1,-1],[0,-1]] | |
# total_mines | |
@lose = false |