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

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

@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 {
@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 / gist:2791762
Created May 26, 2012 02:23
Javascript: alert
/* it's good to use snippet */
alert("done");
@kuyseng
kuyseng / gist:2791781
Created May 26, 2012 02:32
javascript: photoshop get all text
/*
get all texts from text layer in photoshop.
*/
function get_all_text (document) {
var doc = document || app.activeDocument;
if(doc != null || doc != undefined){
var str = "";
var layer = null;
var objArray = [];
var text = "";
@kuyseng
kuyseng / try_main.jsx
Created May 26, 2012 03:13
javascript: indesign run main in try
try{
main();
}catch(e) {
var message = "Error String: " + e.description + "\n";
message += "Line: " + e.line;
alert(message);
};
@kuyseng
kuyseng / gist:2791919
Created May 26, 2012 03:17
javascript: read from file as string
function build_string_from_name_page_file (name_page_file) {
var all_name_string = "";
var tmp_arr = [];
var tmp_str = "";
if(name_page_file !=null) {
all_name_string = "::";
name_page_file.open("r");
while(!name_page_file.eof){
tmp_str = name_page_file.readln();
tmp_arr = tmp_str.split("\t");
@kuyseng
kuyseng / gist:2792004
Created May 26, 2012 03:35
javascript: indesign replace this page
function replace_this_page (arr, text, num) {
for(var i = 0, len = arr.length;i<len;i++){
if(arr[i] == num){
arr.splice(i,1); arr.unshift(text);}
}
return arr;
};
@kuyseng
kuyseng / gist:2792010
Created May 26, 2012 03:36
javascript: remove file extension
function remove_file_extension(name, extensions) {
var my_extensions = extensions || ["jpg","gif","png","psd","eps","indd","INDL","ai","txt","pdf"];
var reg_string = "\.(" + my_extensions.join("|") + ")$";
var my_reg = new RegExp( reg_string, "i" );
name = name.replace(my_reg, '');
return name;
};
@kuyseng
kuyseng / gist:2792011
Created May 26, 2012 03:36
javascript: format time show rectime record time
function record_time(startTime) {
var secs = Math.round(((new Date()).getTime() - startTime)/1000);
if(secs === 0) return 1;
var str = "",
hr = Math.floor(secs / 3600),
min = Math.floor((secs - (hr * 3600))/60),
sec = secs - (hr * 3600) - (min * 60);
if(hr>0) { str += hr + "h:"; }
if(min>0) { str += min + "mn:"; }
if(sec>0) { str += sec + "s"; }