Skip to content

Instantly share code, notes, and snippets.

View kuyseng's full-sized avatar

Kuyseng CHHOEUN kuyseng

  • Yoolk Inc.
  • Phnom Penh, Cambodia
View GitHub Profile
@kuyseng
kuyseng / mac-php-composer-setup.md
Last active August 2, 2017 10:17 — forked from tomysmile/mac-php-composer-setup.md
Setup PHP Composer using Brew
@kuyseng
kuyseng / gist:19ac0ca29b0e3a9cabbbdcfe5d3f265e
Created February 21, 2017 02:14 — forked from ichord/gist:9808444
demo of using pdf.js to extract pages to images
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit
-->
<body>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->
@kuyseng
kuyseng / gist:e7fed1d031cfbd3cec95d083bcc2aa87
Created February 8, 2017 02:29 — forked from mikestone14/gist:11198630
Getting a GoDaddy domain to point to a Heroku app.
@kuyseng
kuyseng / 0_reuse_code.js
Created January 9, 2017 03:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
class SubscriptionPlan
attributes expiry_date: next_month, monthly_charge: 300, charge_per_rental: 0
end
class PrepaidPlan
attributes expiry_date: never, monthly_charge: 0, charge_per_rental: 100
end
def plan_type
case plan_type
dog.legs.walk! if dog.normal?
dog.hover_craft.hover! if dog.robot?
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')