Skip to content

Instantly share code, notes, and snippets.

View lin's full-sized avatar

Albert Lin lin

View GitHub Profile
@lin
lin / bedrock.md
Last active November 12, 2018 05:38
  1. All things we do, we only update the pixels on pages.

  2. If it is updating base on time, we say it's an animation.

  3. the stage one is to create an image.

Let's consider this react comp.

function Comment(props) {
 return (
  1. install xcode
  2. install homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. install node brew install node
@lin
lin / 1-command.md
Last active January 25, 2017 11:57
Postgresql

one: how to assign different priorities. two:

===========

1, createdb
2, dropdb
3, psql \h (help) \q (quit)
@lin
lin / 1-setup.md
Last active December 9, 2016 06:44
Electron Learning Notes

0, install electron from terminal

npm install -g electron
npm install --save-dev electron

1, create package.jsonfile

2, simple app:

@lin
lin / d3.md
Last active November 22, 2016 05:05
d3 learning

Based on this article.

1, backup database using:

pg_dump -U ubuntu app_development -f ~/Downloads/app.sql

2, upload to the server.

@lin
lin / vpn.md
Last active April 7, 2016 04:59
VPN set up with aws ubuntu
@lin
lin / 01_ruby.md
Last active April 11, 2016 08:16
Install Ruby (2.3.0p0) + Rails (4.2.6) + Postgres (9.3.11) on Ubuntu (ubuntu-trusty-14.04-amd64) with AWS

Last update, 04-08-2016

sudo apt-get update

RVM

sudo apt-get install curl

1, connect to a db

psql postgres
psql database_name

In order to connect to a database you need to know the name of your target database, the host name and port number of the server and what user name you want to connect as.

@lin
lin / lines
Created November 3, 2015 19:30
# rails
find . \( -iname '*.rb' -o -iname '*.css' -o -iname '*.js' -o -iname '*.erb' -o -iname '*.html' -o -iname '*.haml' -o -iname '*.sass' -o -iname '*.scss' -o -iname '*.coffee' \) -exec wc -l {} + | sort -n
# ios
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.swift" ")" -print0 | xargs -0 wc -l