Skip to content

Instantly share code, notes, and snippets.

Avatar

Kuyseng CHHOEUN kuyseng

  • Yoolk Inc.
  • Phnom Penh, Cambodia
View GitHub Profile
@kuyseng
kuyseng / linkedin_download.sh
Last active Jul 23, 2021
Script to download
View linkedin_download.sh
#!/bin/bash
# For Unix OS such as: Ubuntu, Mac
## install
# - curl -o linkedin_download.sh https://gist.githubusercontent.com/kuyseng/53e6ebbab78ce7979c579bdd70319594/raw/e6552ebddc398025c7f4f58cd5fad5c22a7a5c43/linkedin_download.sh
# - chmod +x linkedin_download.sh
# - mv linkedin_download.sh /usr/local/bin/.
# restart your terminal
## Usage:
# linked_download.sh COOKIE_PATH [URL | LIST_PATH]
View install_base_apps_ubuntu16.sh
## run to install: bash <(curl -s https://gist.githubusercontent.com/kuyseng/139b185870812c9a22a14219564295b4/raw) ##
echo "== install docker =="
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce nginx fail2ban unzip
sudo usermod -aG docker ${USER}
#su - ${USER}
echo "== install docker-compose =="
View get_address_in_table.js
var mainContent = document.getElementById('mainContent');
var tds = mainContent.getElementsByTagName('td');
var texts = [];
for(var i=2, len=tds.length; i< len; i++) {
if(/\[P|F\]/.test(tds[i].innerHTML) || i > 4 ) { break }
texts.push(tds[i].textContent.trim());
}
texts.join(', ');
@kuyseng
kuyseng / mac-php-composer-setup.md
Last active Aug 2, 2017 — forked from tomysmile/mac-php-composer-setup.md
Setup PHP Composer using Brew
View mac-php-composer-setup.md
@kuyseng
kuyseng / gist:19ac0ca29b0e3a9cabbbdcfe5d3f265e
Created Feb 21, 2017 — forked from ichord/gist:9808444
demo of using pdf.js to extract pages to images
View gist:19ac0ca29b0e3a9cabbbdcfe5d3f265e
<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 Feb 8, 2017 — forked from mikestone14/gist:11198630
Getting a GoDaddy domain to point to a Heroku app.
@kuyseng
kuyseng / delegate_methods.js
Created Feb 1, 2017
delegate method to other object. it's like method programming #define_method in Ruby
View delegate_methods.js
// delegate methods to wow-book
angular.forEach([ 'insertPage', 'insertPages', 'insertDoublePage', 'removePages' ],
function(name) {
ctrl[name] = function() { return ctrl.book[name].apply(ctrl.book, arguments) };
})
@kuyseng
kuyseng / 0_reuse_code.js
Created Jan 9, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kuyseng
kuyseng / smartColorController.js
Created Nov 30, 2016
using promise in angular
View smartColorController.js
// this controller depends on StyleSwitcherController in instant_website
;(function () {
'use strict';
angular
.module('iwApp')
.controller('SmartSite.Customize.SmartColorController', SmartColorController);
SmartColorController.$inject = ['$controller', '$scope', '$state', '$timeout', '$q', 'events', 'ApiService', 'logoFactory', 'SmartColorService'];
@kuyseng
kuyseng / SassMeister-input.scss
Created Mar 15, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$color-red: (
'50': #ffebee,
'100': #ffcdd2,
'200': #ef9a9a,
'300': #e57373,