Skip to content

Instantly share code, notes, and snippets.

View junwatu's full-sized avatar
🚀
Ship it!

Equan P. junwatu

🚀
Ship it!
View GitHub Profile
@junwatu
junwatu / README.md
Last active December 14, 2023 16:15
Indonesia Map
@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 / 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 / gist:ecd7ef73921cbe3818d3
Last active September 19, 2015 04:14 — forked from janjongboom/gist:94d575526a689687a6b8
Firefox OS / JanOS on Raspberry Pi with GPIO support

This does NOT work on Raspberry Pi 2!

  1. Obtain a 8GB (or bigger) SD Card
  2. Download disk image from http://janos.io/builds/fxos-pi-gpio.img.zip and unzip
  3. Put SD card in your computer
  4. Find out where your SD card is mounted (BE REALLY SURE ITS THE RIGHT DEVICE, IT WILL BE WIPED COMPLETELY!!!), f.e. /dev/disk5 on OSX
  5. On Linux, run: sudo dd bs=4M if=fxos-pi-gpio.img of=/path/to/your/disk
  6. On OSX, run: sudo dd bs=4m if=fxos-pi-gpio.img of=/dev/rdisk5 (do rdisk, not disk here!)
  7. When it's done put it in your Pi and start up
  8. The demo's are wired like this: yellow LED on GPIO2, red LED on GPIO3, button (wire it as pulldown) on GPIO26.
@junwatu
junwatu / introrx.md
Created October 1, 2015 23:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
‘use strict’
const mbambung = require(‘komponist’);
mbambung.createConnection((err, client) => {
if(!err){
client.command(‘load’,[‘Mbambung’], (err, res) => {
client.play(function(err) {
client.currentsong(function(err, info) {
console.log(info.Artist);
@junwatu
junwatu / Torsi.cs
Created May 1, 2016 23:58
Torque - Unity 3D
using UnityEngine;
public class Torsi : MonoBehaviour {
public Rigidbody rb;
public float torque;
void Start () {
rb = GetComponent<Rigidbody>();
}
@junwatu
junwatu / separate.c
Created July 30, 2016 18:37 — forked from keiya/separate.c
Split Motion-JPEG (MJPEG) Stream into JPEG files; for Syma X5SW WiFi FPV Camera. ; also included realtime streaming shell script which is using VLC.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_FRAME_SIZE 256*1024 // KB
#define CONTENT_LENGTH "Content-Length: "
#define PAYLOAD "\r\n"
int main()
{
@junwatu
junwatu / gen.swift
Created November 11, 2016 22:58 — forked from blainerothrock/gen.swift
A Very Simple Genetic Algorithm Written in Swift 3
#!/usr/bin/env xcrun swift
/*
gen.swift is a direct port of cfdrake's helloevolve.py from Python 2.7 to Swift 3
-------------------- https://gist.github.com/cfdrake/973505 ---------------------
gen.swift implements a genetic algorithm that starts with a base
population of randomly generated strings, iterates over a certain number of
generations while implementing 'natural selection', and prints out the most fit
string.
The parameters of the simulation can be changed by modifying one of the many
@junwatu
junwatu / index.html
Last active July 5, 2017 01:27
Akses DOM di Browser Window - Index.html
<div id="deskripsi"></div>