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 / SassMeister-input.scss
Created March 15, 2015 02:31
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$color-red: (
'50': #ffebee,
'100': #ffcdd2,
'200': #ef9a9a,
'300': #e57373,
@kuyseng
kuyseng / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<template>
<style>
:host {

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')
@kuyseng
kuyseng / gist:2994150
Created June 26, 2012 07:37
javascript: photoshop save for web call menu
function RunSaveForWeb() {
var id637 = charIDToTypeID( "slct" );
var desc89 = new ActionDescriptor();
var id638 = charIDToTypeID( "null" );
var ref21 = new ActionReference();
var id639 = charIDToTypeID( "Mn " );
var id640 = charIDToTypeID( "MnIt" );
var id641 = charIDToTypeID( "Svfw" );
ref21.putEnumerated( id639, id640, id641 );
desc89.putReference( id638, ref21 );
@kuyseng
kuyseng / fitiamge
Created June 25, 2012 08:48
javascript: photoshop fit Image width height
// reference: http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3409&sid=f4a754d74f5b92fa6732a283c0e20fd9
function FitImage( inWidth, inHeight ) {
var desc = new ActionDescriptor();
var unitPixels = charIDToTypeID( '#Pxl' );
desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
executeAction( runtimeEventID, desc, DialogModes.NO );
};
@kuyseng
kuyseng / gist:2958113
Created June 20, 2012 04:22
javascript: get array from range min max
function get_range (min, max) {
var arr = [];
for (var i = 0; i <= (max - min); i++) {
arr[i] = min + i;
};
return arr;
}