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 / 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 / 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 / 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
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(', ');
## 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 =="
@kuyseng
kuyseng / linkedin_download.sh
Last active July 23, 2021 04:18
Script to download
#!/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]
@kuyseng
kuyseng / create-yoolk-dev-env.sh
Last active August 14, 2023 02:30
create_docker_dev_for_projects
#!/bin/bash
# curl -s https://gist.githubusercontent.com/kuyseng/ebbb8eb8862136cfae9fd3926e7acd4c/raw/create-yoolk-dev-env.sh | bash
cat > compose-dev.yaml <<- EOM
version: '3.8'
services:
app:
image: kuyseng/ruby:v2.3.1
init: true
entrypoint: 'sleep infinite'