Skip to content

Instantly share code, notes, and snippets.

Alpha Chen kejadlen

Block or report user

Report or block kejadlen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View refactoring.rb
require "yaml"
require "minitest/autorun"
require "minitest/pride"
class TestStatement < Minitest::Test
def statement(invoice, plays)
total_amount = 0
volume_credits = 0
result = "Statement for #{invoice.fetch("customer")}\n"
  • asymmetric colocation
    • Kevin: put your zoom room in your slack status
    • Teamspeak
  • tools for screen sharing w/clients
    • Team Viewer
    • Tandem ("do not share with clients")
    • Zoom
    • WebEx?
  • wearing headphones all day
    • krisp (?) audio filter
extern crate serde_derive;
extern crate serde;
extern crate warp;
use warp::Filter;
fn main() {
// Match any request and return hello world!
View term_frequency.rb
STOP_WORDS = %w[ the for in ].map(&:downcase)
.reject {|word| STOP_WORDS.include?(word) }
.each.with_object( {|word, freqs| freqs[word] += 1 }
.sort_by {|_, freq| freq }
.map {|word, freq| "#{word} - #{freq}" }
View irv.rb
❯ ruby irv.rb
{:rain=>7, :women=>5, :islands=>4, :trees=>6, :salmon=>9, :parks=>5}
Eliminating: [:islands]
{:rain=>8, :women=>5, :parks=>6, :trees=>6, :salmon=>11}
Eliminating: [:women]
{:rain=>9, :parks=>6, :trees=>7, :salmon=>14}
Eliminating: [:parks]
{:rain=>10, :trees=>10, :salmon=>16}
Eliminating: [:rain, :trees]
Winner: salmon
View Gemfile
source ""
gem "activerecord"
gem "sqlite3"
group :development do
gem "pry"
View crosswords.json
View qfx.rb
require "date"
require "strscan"
module QFX
Transaction =, :date, :amount, :fitid, :name, keyword_init: true)
class Parser
def initialize(raw)
@ss =
View chase.rb
#!/usr/bin/env ruby
require "io/console"
require "capybara"
require "capybara/dsl"
require "selenium-webdriver"
require "pry"
print "Username: "
View day_18.rb
class Program
def initialize(id, instructions, input, output)
@id, @instructions, @input, @output = id, instructions, input, output
@registers = {|h,k|
if k =~ /[a-z]/
h[k] = 0
h[k] = k.to_i
You can’t perform that action at this time.