Skip to content

Instantly share code, notes, and snippets.

View arbo77's full-sized avatar
🤧
I may be slow to respond.

Ari Wibowo arbo77

🤧
I may be slow to respond.
View GitHub Profile
@arbo77
arbo77 / hosts
Last active August 29, 2015 14:09
Setting multiple expressjs app menggunakan apache virtual hosting + mod_proxy
127.0.0.1 localhost.io
127.0.0.1 www.localhost.io
127.0.0.1 www1.localhost.io
127.0.0.1 www2.localhost.io
127.0.0.1 nodejs.localhost.io
@arbo77
arbo77 / mysql-connect.js
Created November 12, 2014 19:21
NodeJS MySQL connection
var mysql = require('mysql');
var connection = mysql.createConnection(
{
host : 'localhost',
user : 'root',
password : '',
database : 'apps',
multipleStatements: true,
}
@arbo77
arbo77 / checkport.js
Created November 12, 2014 19:20
NodeJS check local port
var args = process.argv.slice(2);
if(args.length == 0){
console.log('port required')
process.exit(0)
}
var port = parseInt(args[0]);
var net = require('net');
@arbo77
arbo77 / cacert.pem
Last active August 29, 2015 14:02
Tweet with media
##
## ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Jan 28 09:38:07 2014
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla-release/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
@arbo77
arbo77 / 0_reuse_code.js
Created February 6, 2014 14:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@arbo77
arbo77 / rollerup.js
Created October 11, 2013 13:43
jQuery Roller Up Plugin
(function($){
$.fn.rollerUp = function() {
var el = $(this)[0];
var ch = $(el).children()[0];
$(ch).animate({height:'0px', opacity: 0},500,function(){
$(this).remove();
setTimeout(function(){
$(ch).attr("style","");
$(el).append(ch);
$(el).rollerUp();
@arbo77
arbo77 / mason.css
Created April 12, 2013 09:28
QuoJS Masonry example
body{
margin: 2em auto;
}
.box{
background: whitesmoke;
margin-bottom: 10px;
}
$(document).ready(function(){
$(".blog-posts").appendTo(".xc");
var nsect = $(".post-body").html().split("==NP==")
$("<div class='npost-body></div>").appendTo(".post-header")
for(i in nsect){
$("<section></section>").html(nsect[i]).appendTo("npost-body")
}
})
@arbo77
arbo77 / .conkyrc
Created December 18, 2012 10:45
Simple conky configuration
# conky configuration
# http://arbo77.com
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont DejaVu Sans:size=7
xftalpha 1
update_interval 1.0
@arbo77
arbo77 / frmGuiFetch.java
Created September 20, 2012 10:47
Simple Java fetching MySQL records into DefaultTableModel
class frmGuiFetch {
public static void main(String[] args)
{
guiFetch f = new guiFetch();
f.setVisible(true);
}
}