Skip to content

Instantly share code, notes, and snippets.

🌪
Swirling

Rizky Ario rizkyario

🌪
Swirling
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
rizkyario / python-es6-comparison.md
Created Nov 25, 2018 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison
View python-es6-comparison.md

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
View quick-sort.c
#include <stdio.h>
void
swap (int *a, int *b)
{
int temp;
temp = *a;
*a = *b;
*b = temp;
@rizkyario
rizkyario / docker-gui.sh
Last active May 29, 2018
Run GUI app from docker
View docker-gui.sh
#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
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 support.md

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.

Requirements

OS X 10.10 (Yosemite) or newer

@rizkyario
rizkyario / pamp-index.php
Created Feb 22, 2018
index file for PAMP
View pamp-index.php
<?php phpinfo(); ?>
View gitlab-entrypoint.sh
/opt/gitlab/embedded/bin/runsvdir-start&
EXTERNAL_URL="localhost" && gitlab-ctl reconfigure
tail -f /dev/null
@rizkyario
rizkyario / app.js
Last active Sep 9, 2017
search-sign
View app.js
var request = require('request');
language = 'LSF'
search = 'right'
var options = {
url: `https://isara.search.windows.net/indexes/isara/docs?api-version=2015-02-28&searchMode=all&queryType=full&search=language:${language}%20AND%20speaker:${search}%20OR%20${search}*&api-key=F6621A479929D2E2B331E35CC3520462`,
headers: {
'Access-Token': 'request'
}
@rizkyario
rizkyario / gui-docker.md
Last active Sep 18, 2019
Running Graphical applications in Docker for Mac
View gui-docker.md

Setup

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 xquartz.org. 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
rizkyario / install-opencv.sh
Last active Feb 27, 2019
Install OpenCV 3 with Python 2.7
View install-opencv.sh
# 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.