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

Howto build a rust compiler for the Raspberry Pi on Debian 7.1 (wheezy)

sudo apt-get install git build-essential
test `uname -m` = x86_64 && sudo apt-get install ia32-libs
git clone https://github.com/raspberrypi/tools.git
export PATH=$PWD/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
git clone http://github.com/mozilla/rust.git
cd rust
./configure --target-triples=arm-unknown-linux-gnueabihf

make

@junwatu
junwatu / Object.observe() Binding
Last active August 29, 2015 13:57
Object.observer binding example
Just a raw and dull Object.observe() example, test on Google Chrome Version 35.0.1897.2 dev aura
0. Enable flags "Enable Experimental JavaScript" on Google Chrome.
1. Make HTML file to load JS file
<!-- index.html -->
<!doctype html>
@junwatu
junwatu / L4-101
Last active August 29, 2015 13:59
Laravel 4 Tips & Troubleshooting
**1.** Artisan migrate or db:seed error because of false mysql.sock config
**Problem:**
Command `artisan migrate` or `artisan db:seed` have this error message
[PDOException] SQLSTATE[HY000] [2002] No such file or directory
**Solution:**
@junwatu
junwatu / ArchLinuxARM on Qemu
Created June 5, 2014 07:04
ArchLinuxARM on Qemu
#Check image to find Linux partition
$ fdisk -l ArchLinuxARM-2014.05-rpi.img
console output
Disk ArchLinuxARM-2014.05-rpi.img: 1960 MB, 1960837120 bytes
255 heads, 63 sectors/track, 238 cylinders, total 3829760 sectors
Units = sectors of 1 * 512 = 512 bytes
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;
@junwatu
junwatu / Jracy.markdown
Last active August 29, 2015 14:05
A Pen by Equan Pr..
@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">
@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 / 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 / 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