Skip to content

Instantly share code, notes, and snippets.

View berkedel's full-sized avatar

Akhmad Syaikhul Hadi berkedel

View GitHub Profile
@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
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
@berkedel
berkedel / React Editor Conf.md
Created April 4, 2016 05:02
How to Configure Text Editors and IDEs for React.js

How to Configure Text Editors and IDEs for React.js img

Tips and tricks on how to configure your favorite text editor or IDE to work with React.js/ES6+/JSX.

WebStorm

Create a new project based on React Starter Kit template

react-project-template-in-webstorm

@berkedel
berkedel / Cocoapod Troubleshooting.md
Created April 7, 2016 08:30
Cocoapod Troubleshooting

Cocoapod Troubleshooting

Stuck on installing forever

$ pod repo remove master
$ pod setup
$ pod install --verbose
@berkedel
berkedel / gist:cb176ed35d63118ceacfb310bacad55d
Last active July 14, 2016 16:36 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin 1.0

Kotlin project website is at kotlinlang.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@berkedel
berkedel / gist:d17a5057f829d8aefec333410818439a
Created April 7, 2016 13:54 — forked from dodyg/gist:5616605
Kotlin Programming Language Cheat Sheet Part 2

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
 println("${y.x}")
@berkedel
berkedel / gist:d31ef0d6d28b643e61820dd29c44e58e
Created April 7, 2016 13:54 — forked from dodyg/gist:5823756
Kotlin Programming Language Cheat Sheet Part 3

#Control Structures

##If statement

Kotlin if statement should look familiar with other language

fun main(args : Array<String>) {
 val total = 10

Show

Pushes the destination view controller onto the navigation stack, moving the source view controller out of the way (destination slides overtop from right to left), providing a back button to navigate back to the source - on all devices Example: Navigating inboxes/folders in Mail

Show Detail

Replaces the detail/secondary view controller when in a UISplitViewController with no ability to navigate back to the previous view controller Example: In Mail on iPad in landscape, tapping an email in the sidebar replaces the view controller on the right to show the new email