Skip to content

Instantly share code, notes, and snippets.

View ariestiyansyah's full-sized avatar
🥬
Planting...

Rizky ariestiyansyah

🥬
Planting...
  • Blockchain
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Network error messages -->
<!-- Error shown when user attempts an action but needs an internet connection -->
<string name="network_not_connected">You are not connected to the Internet.</string>
<!-- Concise error shown when user attempts an action but needs an internet connection -->
<string name="network_not_connected_short">Network not reachable</string>
<!-- Alert dialog title shown when a network request fails -->
<string name="reset_no_network_title">Connection Error</string>
@ariestiyansyah
ariestiyansyah / indonesiax-db.py
Created August 31, 2015 06:31
Database Dumping Tools for IndonesiaX
#!/usr/bin/env python
import fileinput
import csv
import sys
# This prevents prematurely closed pipes from raising
# an exception in Python
from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE, SIG_DFL)
@ariestiyansyah
ariestiyansyah / cms
Created September 12, 2015 21:19
Default cms Open Edx Configuration
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 / 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;
@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
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
# 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;
}
@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"
/*!
* 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
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