Skip to content

Instantly share code, notes, and snippets.

View xemoe's full-sized avatar
🏠
Working from home

Teerapong Ladlee xemoe

🏠
Working from home
  • Bangkok, Thailand
View GitHub Profile
@xemoe
xemoe / phantomjs_facebook.js
Created May 28, 2018 08:32 — forked from ecin/phantomjs_facebook.js
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@xemoe
xemoe / clean-up-boot-partition-ubuntu.md
Created December 31, 2017 02:41 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@xemoe
xemoe / setup.md
Last active April 1, 2022 10:47
urd setup

setup dotfiles

sudo apt-get update
sudo apt-get install git
sudo locale-gen
sudo dpkg-reconfigure locales
git clone https://gist.github.com/675e0a9251a294537b9c.git dotfiles_setup
cd ./dotfiles_setup
./main.sh --pkg=common --user=srandev install
chsh -s /bin/zsh
@xemoe
xemoe / negroni-gorilla.go
Created December 14, 2017 17:40 — forked from danesparza/negroni-gorilla.go
Negroni with Gorilla mux subrouter
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
"log"
"net/http"
)
@xemoe
xemoe / index.html
Created January 22, 2017 21:44 — forked from dnprock/index.html
World Map
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@xemoe
xemoe / readme.md
Last active May 15, 2019 17:36
Reset mariadb root password
@xemoe
xemoe / parallel.c
Last active December 2, 2016 16:12
Parallel ball
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_CONCURRENT 10
pthread_mutex_t mutex;
pthread_cond_t condvar;
@xemoe
xemoe / fixes.md
Created October 21, 2016 10:17
Fixes: perl: warning: Setting locale failed.
sudo locale-gen
sudo dpkg-reconfigure locales
@xemoe
xemoe / change.js
Created July 9, 2016 14:28
Change manga links to all page
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
})();
$('a.lst').each(function(a,b) { $(b).attr('href', $(b).attr('href') + '/?all') });