Skip to content

Instantly share code, notes, and snippets.


Rizky Ario rizkyario

Block or report user

Report or block rizkyario

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rizkyario /
Created Nov 25, 2018 — forked from revolunet/
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL


import math
View quick-sort.c
#include <stdio.h>
swap (int *a, int *b)
int temp;
temp = *a;
*a = *b;
*b = temp;
rizkyario /
Last active May 29, 2018
Run GUI app from docker
#Install XQuartz and Docker
brew cask install xquartz
brew cask install docker
# Open XQuartz
# In the XQuartz preferences, go to the “Security” tab
# Make sure you’ve got “Allow connections from network clients” ticked
open -a XQuartz
# Setup ENV
rizkyario / .zshrc
Last active Jul 15, 2018
Z-shell resource
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="$HOME/.fastlane/bin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH=/Users/rizkyario/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
View Build tensorflow on OSX with NVIDIA CUDA

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.


OS X 10.10 (Yosemite) or newer

rizkyario / pamp-index.php
Created Feb 22, 2018
index file for PAMP
View pamp-index.php
<?php phpinfo(); ?>
EXTERNAL_URL="localhost" && gitlab-ctl reconfigure
tail -f /dev/null
rizkyario / app.js
Last active Sep 9, 2017
View app.js
var request = require('request');
language = 'LSF'
search = 'right'
var options = {
url: `${language}%20AND%20speaker:${search}%20OR%20${search}*&api-key=F6621A479929D2E2B331E35CC3520462`,
headers: {
'Access-Token': 'request'
rizkyario /
Last active Feb 14, 2020
Running Graphical applications in Docker for Mac


Docker for Mac lets you run any Linux executable in an isolated process on Mac. A graphical app is just another process, that needs access to the X11 socket of the system, or an X11 server. You can run X11 applications on a Mac using an open source project called Xquartz. The steps to expose XQuartz to a Linux process running in Docker are simple:

  1. install XQuartz from Note: you need to install XQuartz version 2.7.10, version 2.7.11 does not work with Docker for Mac. Then you have 3 choices:
  2. Proxy the XQuartz socket to port 6000 or
  3. Tell Xquartz to accept network calls. This is not very secure.
  4. Tell Xquartz to accept network calls and require authentication, setup X11 security using xauth, and mount ~/.Xauthority in the container.
rizkyario /
Last active Feb 27, 2019
Install OpenCV 3 with Python 2.7
# Install Xcode
# Before we can even think about compiling OpenCV, we first need to install Xcode,
# a full blown set of software development tools for the Mac Operating System.
# Accept the Apple Developer license
sudo xcodebuild -license
# Install Apple Command Line Tools
sudo xcode-select --install
You can’t perform that action at this time.