Skip to content

Instantly share code, notes, and snippets.

udomsak udomsak

Block or report user

Report or block udomsak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
udomsak /
Last active Apr 11, 2019
Bulk remove folks repositories
#!/usr/bin/env python
from github import Github
g = Github("4a3d3c5ba12e402015dcdcf55c312e0614xxxxx888s")
folks_repo = [ repo for repo in g.get_user().get_repos() if repo.fork == True]
for repo in folks_repo:
udomsak / runner.js
Created Dec 25, 2018
fastify-validation not work.
View runner.js
// Require the framework and instantiate it
const fastify = require('fastify')({
logger: true
const post_schema = {
method: 'GET',
schema: {
body: {
type: 'object',
udomsak /
Created Dec 24, 2018
Install postman on Fedora core 29 - Dec 2018
wget -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
GenericName=API Client
udomsak /
Created Dec 20, 2018
kubectl apply rbac rules to microk8s
# Restart API server
systemctl restart snap.microk8s.daemon-apiserverd
# Apply rules
kubectl apply -f rbac-microk8s.yml
# Check running
kubectl get clusterroles cluster-admin
udomsak / Dockerfile
Created Dec 19, 2018
Dockerfile kyoto-tycoon ( kt-server ) by @narate
View Dockerfile
FROM alpine:3.7
MAINTAINER Narate Ketram <>
RUN apk update && apk add git build-base lua5.1-dev lzo-dev zlib-dev
RUN cd /tmp && \
git clone && \
cd kyoto && \
make && \
make install && \
make clean && \
udomsak /
Created Dec 19, 2018
kyoto-tycoon compile on fedora-core 29
git clone
sudo dnf install openssl-devel kyotocabinet-devel
sudo make install 
echo /usr/local/lib > /etc/
sudo ldconfig
udomsak / message-with-pic.json
Last active Oct 24, 2018
Navy Line messaging payload format
View message-with-pic.json
"events": [
"type": "message",
"replyToken": "e772d6f6b3ce4f198f58a0671889ac55",
"source": {
"userId": "U55aa364949999f07b2f7b6b9de0ef07",
"type": "user"
"timestamp": 1540374281107,
udomsak / linearRegression.ipynb
Last active Oct 21, 2018
บันทึก ไฟล์ examsample LinearRegression ระหว่างสอน วันที่ 20-10-2018
View linearRegression.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
udomsak / docker-compose.yml
Created Oct 11, 2018
verdaccio docker-compose
View docker-compose.yml
version: "2"
image: verdaccio/verdaccio
hostname: npm-registry
- 4873:4873
# volumes:
# - /etc/verdaccio/conf:/verdaccio/conf
# - /var/cache/verdaccio/storage:/verdaccio/storage
View chai-test-file-upload-actionhero.js
//Define variable before init ActionHero SpecHelper
api.config.upload_config.storage_path = 'c:\\tmp'
// Run API
let {fileUpLoad} = await api.specHelper.runAction('SuperFileUpload')
// Run Async/Awaith Test API
await chai.request('http://localhost:' + api.config.servers.web.port)
// API end point
/* res.body return JSON object from an API
* define object or key-value you want to check ( property and value )
You can’t perform that action at this time.