Skip to content

Instantly share code, notes, and snippets.

View chirayukong's full-sized avatar

Chirayu (Kong) Wongchokprasitti chirayukong

View GitHub Profile
@flovv
flovv / scrapeGoogleImages.js
Last active September 25, 2020 05:10
scrapeGoogleImages_file1
var url ='https://www.google.de/search?q=Yahoo+logo&source=lnms&tbm=isch&sa=X';
var page = new WebPage()
var fs = require('fs');
var vWidth = 1080;
var vHeight = 1920;
page.viewportSize = {
width: vWidth ,
height: vHeight
@stfp
stfp / SelfKiller.java
Created May 19, 2011 03:21
Java class to kill the current process using JNA
/* Requires JNA
* Get jna.jar here: http://java.net/projects/jna/sources/svn/show/trunk/jnalib/dist
*/
import com.sun.jna.Library;
import com.sun.jna.Native;
public class SelfKiller
{
private interface CLibrary extends Library
{
@jgomezdans
jgomezdans / random.py
Created May 15, 2010 23:24
Random colormap for matplotli
import matplotlib,numpy
import pylab
# A random colormap for matplotlib
cmap = matplotlib.colors.ListedColormap ( numpy.random.rand ( 256,3))
pylab.imshow ( Z, cmap = cmap)
pylab.show()