Skip to content

Instantly share code, notes, and snippets.

View junwatu's full-sized avatar
🚀
Indie Hacker

Equan P. junwatu

🚀
Indie Hacker
View GitHub Profile
@junwatu
junwatu / defaults-overrides.md
Last active August 29, 2015 14:27 — forked from ericelliott/defaults-overrides.md
ES6 defaults / overrides pattern

ES6 Defaults / Overrides Pattern

Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.

function foo ({
    bar = 'no',
    baz = 'works!'
  } = {}) {
@junwatu
junwatu / raspbian-upgrade.md
Last active August 29, 2015 14:23
Raspberry Pi Wheezy to Jessie

#Wheezy

##Remove Desktop Environment

To remove all desktops I just did (go make a pot of coffee. Take a walk this will take a while)

$ sudo apt-get remove --auto-remove --purge libx11-.*

Installed deborphan to get rid of orphaned files

@junwatu
junwatu / README.md
Last active December 14, 2023 16:15
Indonesia Map
@junwatu
junwatu / index.html
Last active August 29, 2015 14:21
call() and apply() - source http://jsbin.com/fivahatiji
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<pre>Open Console</pre> &rarr; <pre>ctrl+shift+j</pre>
<script id="jsbin-javascript">
// call() and apply() method
@junwatu
junwatu / s3.sh
Last active August 29, 2015 14:20 — forked from chrismdp/s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
/**
* Need io.js 1.x or promise native on Node.js (v0.11 ?)
*/
var request = require('request');
function NgeGithub() {
}
@junwatu
junwatu / ngegithub.js
Created April 5, 2015 06:49
Ambil Isi Gist Berdasarkan Gist ID
/**
* ngegithub.js
* - ambil gist berdasarkan id gist.
*/
var Q = require('q');
var request = require('request');
function NgeGithub() {
//constructor
@junwatu
junwatu / app.js
Last active August 29, 2015 14:08 — forked from brigand/app.js
var React = require("react"), Dom = React.DOM;
var LogOutButton = require('./src/logout');
var events = require('api/events');
var Main = React.createClass({
// this mixin provides this.emitLogout, and if we set onLogout it'll be called when "logout" is emitted
mixins: [events.mixinFor("logout")],
getInitialState: function(){
return {
@junwatu
junwatu / README.md
Last active August 29, 2015 14:07 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@junwatu
junwatu / index.html
Last active August 29, 2015 14:06
Filter values on nested object based on key name -- http://jsbin.com/cunalopopule/15
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Filter values on nested object based on key name" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-source-javascript" type="text/javascript">