Skip to content

Instantly share code, notes, and snippets.

View ariestiyansyah's full-sized avatar
馃ガ
Planting...

Rizky ariestiyansyah

馃ガ
Planting...
  • Blockchain
View GitHub Profile
@ariestiyansyah
ariestiyansyah / indonesia.json
Created November 8, 2015 07:27
Indonesia in JSON
This file has been truncated, but you can view the full file.
{
"desa": [
{
"id": "1101010001",
"id_kecamatan": "1101010",
"nama": "Latiung"
},
{
"id": "1101010002",
"id_kecamatan": "1101010",
@ariestiyansyah
ariestiyansyah / matrix.html
Created November 6, 2015 06:33
Matrix in your browser
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Matrix</title>
<style>
* {margin: 0; padding: 0;}
body {background: black;}
canvas {display: block;}
</style>
#carousel {
margin:40px 20px;
overflow:hidden;
padding:0;
position:relative;
width:auto;
}
/* navigation items */
#carousel .navigation {
var carousel = (function(){
var container = document.getElementById('carousel'),
items = container.getElementsByTagName('ul')[0];
var active = 0, // the active item (sits far left)
properties = {}, // used to calculate scroll distance
animating = false; // whether the carousel is currently animating
// use Modernizr.prefixed to get the prefixed version of boxOrdinalGroup
/*!
* Modernizr v2.5.3
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
* Available under the BSD and MIT licenses: www.modernizr.com/license/
*/
/*
* Modernizr tests which native CSS3 and HTML5 features are available in
@ariestiyansyah
ariestiyansyah / insight.sh
Last active September 1, 2021 13:10
Install Open edX insight with single run
#!/bin/bash
LMS_HOSTNAME="https://mulby.sandbox.edx.org"
DB_USERNAME="read_only"
DB_HOST="localhost"
DB_PASSWORD="password"
DB_PORT="3306"
# Run this script to set up the analytics pipeline
echo "Assumes that there's a tracking.log file in \$HOME"
sleep 2
echo "Install needed packages"
# LMS configuration file for nginx, templated by ansible
upstream lms-backend {
server 127.0.0.1:8000 fail_timeout=0;
}
server {
listen 80;
return 301 https://$host$request_uri;
}
upstream cms-backend {
server 127.0.0.1:8010 fail_timeout=0;
}
server {
# CMS configuration file for nginx, templated by ansible
# Proxy to a remote maintanence page
# error pages
@ariestiyansyah
ariestiyansyah / interaction.py
Created September 22, 2015 17:51
Python script to demo all interaction functions of the API
import base64
import requests
import json
import random
import pprint
import urllib
import base64
from dateutil.parser import parse
from sys import argv
@ariestiyansyah
ariestiyansyah / lms
Last active October 21, 2015 17:08
Default LMS Open Edx Configuration
upstream lms-backend {
server 127.0.0.1:8000 fail_timeout=0;
}server {
# LMS configuration file for nginx, templated by ansible
# error pages
error_page 504 /server/server-error.html;
error_page 502 /server/server-error.html;
error_page 500 /server/server-error.html;