Skip to content

Instantly share code, notes, and snippets.

@desnor
desnor / .tmux.conf
Created September 11, 2019 03:01
Tmux Conf
# 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
@desnor
desnor / cloudSettings
Created January 31, 2019 01:19
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-31T01:19:15.456Z","extensionVersion":"v3.2.4"}
@desnor
desnor / number-range.js
Created December 6, 2018 06:58
Giving the JavaScript number a range method
// 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++
}
}
})
# 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 ->
@desnor
desnor / AngularMines Board Logic
Created May 1, 2015 04:54
Board Model Logic - Cara & Alex
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