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
| " put in .config/nvim/autoload/test/javascript/bun.vim | |
| " add to vim config: | |
| " vim.cmd([[ | |
| " let test#custom_runners = {'javascript': ['bun']} | |
| " ]]) | |
| if !exists('g:test#javascript#bun#file_pattern') | |
| let g:test#javascript#bun#file_pattern = '\v(__tests__/.*|(spec|test))\.(js|jsx|coffee|ts|tsx)$' | |
| endif | |
| function! test#javascript#bun#test_file(file) abort |
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
| ```class Candidate | |
| attr_accessor :ambition, :location, :education, :skills | |
| def initialize person | |
| @ambition = person.ambition | |
| @location = person.location | |
| @education = person.education | |
| @skills = person.skills | |
| end | |
| end |
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
| nmap <leader>rh :%s/\v:(\w+) \=\>/\1:/g<cr> |
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
| require 'rspec' | |
| #http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx | |
| class String | |
| def hashKey | |
| rot_hash | |
| end |
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
| rvm env . > .powenv | |
| touch tmp/restart.txt |
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
| class Walrus | |
| attr_reader :energy | |
| def initialize | |
| @energy = 0 | |
| end | |
| def receive_gift!(gift) | |
| if gift.edible? | |
| @energy += gift.digest.energy |
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
| class LRUCache | |
| def initialize(size = 10) | |
| @size = size | |
| @store = {} | |
| @lru = [] | |
| end | |
| def set(key, value) | |
| @store[key] = value |
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
| class Cache | |
| attr_accessor :max_size | |
| def initialize | |
| @max_size = 99 | |
| @cache = {} | |
| end | |
| def store(key,object) | |
| @cache[key] = [0,object] | |
| purge_old | |
| key |
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
| <?xml version="1.0" encoding="UTF-8"?><Response><Play>http://izerion.com/da1392f0-460b-012f-74be-3c07544054a5.wav?asdf</Play></Response> |
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
| alias app_setup='br db:drop:all && br db:create:all && br dsi:schema:load && br db:schema:load && br db:seed' |
NewerOlder