Skip to content

Instantly share code, notes, and snippets.

View yoonwaiyan's full-sized avatar
🏠
Working from home

Wai Yan Yoon yoonwaiyan

🏠
Working from home
View GitHub Profile

Phoenix 1.4.x to 1.5.0 upgrade instructions

Phoenix 1.5 requires Elixir >= 1.7. Be sure your existing version is up to date by running elixir -v on the command line.

Install the new phx.new project generator

$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.5.0
@lissdy
lissdy / routes_csv.rake
Created August 7, 2018 06:31
Export rails routes to csv
namespace :routes do
desc 'Print out all defined routes in CSV format.'
task :csv => :environment do
class CSVFormatter
def initialize
@buffer = []
end
def result
@cheeaun
cheeaun / rdrc2016.md
Last active June 13, 2018 08:39
RedDotRubyConf 2016 links & resources 😘
@theRemix
theRemix / exercise.md
Created July 26, 2015 02:25
MongoDB Practice

MongoDB Practice

MongoDB Exercise in mongo shell

Connect to a running mongo instance, use a database named mongo_practice.

Document all your queries in a javascript file to use as a reference.

Insert Documents

@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active April 13, 2024 16:19
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@freekmurze
freekmurze / deploy.php
Last active February 5, 2021 02:43
A sample deploy.php file that can be used with Deployer (http://deployer.in)
<?php
/*
* Define the servers
*/
server('production-web', '<your server url>')
->path('<path to the project on your server>')
->user('<user on the server>')
->pubKey();
/*
@Micka33
Micka33 / install.md
Last active March 17, 2022 10:55
cassandra on mac OSX

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@scarfacedeb
scarfacedeb / 1.form.html.haml
Last active January 18, 2023 22:35
Form with multiple button in rails
/ Form excerpt
= f.button t(".save"), class: "btn"
= f.button t(".publish"), class: "btn", name: "publish"
= f.button t(".test"), class: "btn", name: "test"