Skip to content

Instantly share code, notes, and snippets.

View supaket's full-sized avatar
🐼

supaket wongkampoo supaket

🐼
View GitHub Profile
-server
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=256m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@supaket
supaket / custom-task.js
Last active August 29, 2015 14:26 — forked from CITguy/custom-task.js
Basic pattern for creating a custom Transform stream for use with gulp tasks.
var gulp = require('gulp');
var myTransform = require('./myTransform');
gulp.task('foobar', function (){
return gulp.src("foobar.js")
.pipe(myTransform())
.pipe(gulp.dest('.'));
});
@supaket
supaket / gist:a82e57543a56b89bc194d6e2137c493c
Created July 13, 2016 03:24
Ansible timezone for CentOS
---
- name: Check current timezone
shell: awk -F\" '{ print $2}' /etc/sysconfig/clock
register: current_zone
changed_when: False
- name: Set UTC timezone
file: src=/usr/share/zoneinfo/{{ timezone }} dest=/etc/localtime state=link force=yes
when: current_zone.stdout != '{{ timezone }}'
@supaket
supaket / Java.md
Created February 26, 2017 16:56 — forked from JeOam/Java.md
Install Java 8 on OS X

on El Capitan, after installing the brew...

$ brew update
$ brew tap caskroom/cask
$ brew install Caskroom/cask/java

And Java 8 will be installed at /Library/Java/JavaVirtualMachines/jdk1.8.xxx.jdk/

Check version:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@supaket
supaket / install-comodo-ssl-cert-for-nginx.rst
Created April 9, 2017 07:52 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

Overview

These instructions outline how to install DalmatinerDB on a single node. Scaling out will be covered in a future document. It also covers configuring Telegraf to send in monitoring data and Grafana to build dashboards.

Here's how everything connects together:

dalmatiner architecture

DalmatinerDB Installation Guide (Linux)

These instructions outline how to install DalmatinerDB on a single Linux x86_64 physical server or virtual machine. Scaling out will be covered in a future document. This setup guide also covers configuring CAdvisor and Telegraf to send in monitoring data and Grafana to build dashboards.

Here's how everything connects together:

dalmatiner architecture

Create a VM

@supaket
supaket / set_proxy.sh
Created June 11, 2017 10:28
Set Wi-Fi system wide proxy on Mac OS X
#!/bin/sh
# if no args prints http and https proxy info
if [ -z "$1" ]; then
echo " Wi-Fi HTTP PROXY:"
networksetup -getwebproxy "Wi-Fi"
# if only one arg turns http and https proxy on/off
elif [ -n "$1" ] && [ -z "$2" ]; then
networksetup -setwebproxystate "Wi-Fi" $1
networksetup -setsecurewebproxystate "Wi-Fi" $1
# if wtwo args sets http and https proxy