Skip to content

Instantly share code, notes, and snippets.

View stevencch99's full-sized avatar
🙌
Face the music

Steven C. stevencch99

🙌
Face the music
View GitHub Profile
@stevencch99
stevencch99 / big-o.md
Created November 24, 2023 03:28 — forked from PJUllrich/big-o.md
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@stevencch99
stevencch99 / .dockerignore
Created July 28, 2020 11:31 — forked from yizeng/.dockerignore
An example .dockerignore file for Rails
.git
.gitignore
# Created by https://www.gitignore.io/api/git,ruby,rails,jetbrains+all
# Edit at https://www.gitignore.io/?templates=git,ruby,rails,jetbrains+all
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
@stevencch99
stevencch99 / install_font_adobe_source_code_pro.sh
Created September 4, 2019 06:06 — forked from enzinier/install_font_adobe_source_code_pro.sh
Install font Adobe Source Code Pro on Ubuntu 16.04 LTS
#!/bin/sh
# Userland mode (~$USER/), (~/).
# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts
echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
puts "練習 1:請印出從 1 到 100 之間所有的單數。"
puts " # Ans. 1.1"
(1..100).each do |i|
p i if i.odd?
end
p "======================================"
puts " # Ans. 1.2"
p [*1..100].select { |i| i.odd? }
p "======================================"
@stevencch99
stevencch99 / trello-cards-from-csv.rb
Created November 22, 2017 11:46 — forked from joshmcarthur/trello-cards-from-csv.rb
A Ruby script to import Trello cards from a CSV file
#!/usr/bin/env ruby
# You can skip this bit if you wish - you will need the 'ruby-trello' gem installed, and
# optionally, 'foreman' to run the script with.
require 'bundler/setup'
Bundler.require
require 'trello'
require 'csv'