Skip to content

Instantly share code, notes, and snippets.

View berkedel's full-sized avatar

Akhmad Syaikhul Hadi berkedel

View GitHub Profile
/**
* Add -lupm-ldt0028 flag
*/
#include <iostream>
#include <iomanip>
#include <cmath>
#include <mraa.hpp>
#include <upm/ldt0028.h>
using namespace std;
@berkedel
berkedel / SmartTable.cpp
Created October 18, 2015 00:52
Smart Table
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <mraa.hpp>
@berkedel
berkedel / gist:04f6c5497362f267bf31
Created December 11, 2015 14:57
Android Library Curator
loadtoast :: https://github.com/code-mc/loadtoast
Pretty material design toasts with feedback animations
recyclerview-animators :: https://github.com/wasabeef/recyclerview-animators
An Android Animation library which easily add itemanimator to RecyclerView items.
LinearListView :: https://github.com/frankiesardo/LinearListView
Android library that allows you to bind a LinearLayout with a ListAdapter.
FakeSearchView :: https://github.com/leonardoxh/FakeSearchView
@berkedel
berkedel / Install Latest Node.js On Raspberry Pi 2.md
Created February 4, 2016 12:42
Install Latest Node.js On Raspberry Pi 2

Install Latest Node.js On Raspberry Pi 2.md

Open terminal, and download Node.js package for arm processor. Curently the latest version is v5.5.0.

$ wget https://nodejs.org/dist/v5.5.0/node-v5.5.0-linux-armv7l.tar.gz

Uncompressed the package to any folder. It will create a new folder named node-v4.0.0-linux-armv7l.

$ tar -xvf node-v4.0.0-linux-armv7l.tar.gz
@berkedel
berkedel / Enable Soundcard Di Raspberry Pi 2.md
Created February 15, 2016 04:22
Enable Soundcard Di Raspberry Pi 2

Enable Soundcard Di Raspberry Pi 2

Mungkin sebagian pada bingung, bisa streaming video tapi koq tidak muncul suaranya ya? Karena secara default driver soundcard yang berasal dari USB webcam tidak terindeks di konfigurasi ALSA. Maka dibutuhkan untuk muncul diindeks. Sebelumnya bisa dicek dengan perintah

$ arecord -l

Tampilan outputnya akan nampak seperti berikut

**** List of CAPTURE Hardware Devices ****
card 0: C525 [HD Webcam C525], device 0: USB Audio [USB Audio]
@berkedel
berkedel / Jenkins on OSX.md
Created February 17, 2016 05:17
Jenkins on OSX

Installation

To install Jenkins, run command below in terminal.

$ brew install jenkins

Run

To run manually,

@berkedel
berkedel / Redbear Duo - DFU Installation.md
Last active February 17, 2016 14:12
Redbear Duo - DFU Installation

DFU Installation Guide

dfu-util is a tool for Device Firmware Upgrade to the Duo via the USB port.

Enter DFU Mode

  • Connect the Duo to your computer via the USB port.

  • Press and hold the 'SETUP' button and then press the 'RESET' button, release the 'SETUP' button once you see the RGB is flashing in yellow color.

@berkedel
berkedel / Setup Arduino for Redbear Duo Development.md
Last active February 18, 2016 15:04
Setup Arduino for Redbear Duo Development
  1. Download the Arduino IDE, tested with 1.6.7 on OSX and Windows only but Linux should also work.

  2. Start the IDE and from the menu, Preferences, add the following to "Additional Boards Manager URLs" https://redbearlab.github.io/arduino/package_redbear_index.json

  3. From the menu, Tools > Board, select "Boards Manager" and install the RedBear Duo board support package to the IDE.

  4. Connect the Duo to your computer through the USB port of the Duo. Note that, it is not the RBLink's USB port if you are going to use the RBLink for Grove System components, the following photo shows the setup (connected to Grove RGB LED):

    USB Connection

  5. From the menu, Tools > Board, select RedBear Duo under RedBear IoT Boards.

  6. Select the Port under the Tools menu.

@berkedel
berkedel / Learn ES2015.md
Last active February 28, 2016 03:50
Learn ES2015

Learn ES2015

Original article could be read here.

Arrow Functions to Make Coding Fun

Help to write functions very quickly. This feature is known as lambdas in other language.

ES5:

@berkedel
berkedel / Bypass Gatekeeper.md
Created March 6, 2016 13:31
Bypass Gatekeeper

Bypass Gatekeeper

Have you experienced opening new installed app on mac osx and got "Verifying blabla.app" message? It will be troublesome if you got stuck waiting the verifying process done. In order to ignore this check, you need to bypass Gatekeeper in osx. Just try this, open a terminal and run the command below:

$ cd /Applications
$ xattr -d com.apple.quarantine blabla.app