Skip to content

Instantly share code, notes, and snippets.

View remoharsono's full-sized avatar

Remo Harsono remoharsono

View GitHub Profile
Julia likes to study KMP algorithm again using lecture note. What she likes to do is to go over the lecture
notes word by word, and then focus on thinking process.
She started to review KMP using Chinese blog, but she found out that the blog is not clear, so she likes to
follow up with more detail lecture note.
She likes to write and also she likes to read good writing of the KMP algorithm.
https://www.ics.uci.edu/~eppstein/161/960227.html
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>
@remoharsono
remoharsono / working_with_image.md
Created November 30, 2018 08:59 — forked from prodeveloper/working_with_image.md
How to upload and use images on your Django application

Working with images

We now have everything we need to build a web app, except for images and other binary files. Your application will likely not get a lot of engagement if its not visual. In this lesson, we shall be adding the ability to upload images to your Posts api.

Since this will be a continuation from the class on Deploying to production you are adviced to start by cloning that workspace and then working from there.

Step 1

@remoharsono
remoharsono / klein-url-rewriting.md
Last active December 21, 2018 07:01 — forked from jamesvl/gist:910325
Web server rewrite rules for using klein PHP router

URL-rewriting for klein PHP router

Why rewrite URLs? Check Wikipedia

Apache

Make sure AllowOverride is on for your directory, or put in httpd.conf

# Apache (.htaccess or httpd.conf)

RewriteEngine On

@remoharsono
remoharsono / 0-startup-overview.md
Created February 7, 2019 04:25 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@remoharsono
remoharsono / Enable HTTP2 (h2) in NGINX.md
Created March 3, 2019 05:30 — forked from blagoeres/Enable HTTP2 (h2) in NGINX.md
🌟 Hypertext Transfer Protocol Version 2 (HTTP/2) in NGINX ⭐
@remoharsono
remoharsono / .md
Created March 3, 2019 05:31 — forked from blagoeres/.md
⭐ Frontend tooling & development environment for OS X

Setup your development environment for OS X

I bought new Macbook Pro 15 Retina. These are tools I like to install on macOS operating system.

Checklist

Prep OS X

  • Download and install latest version of Xcode from the Mac App Store.
  • Download and install Apple's Command Line Tools by issuing this command xcode-select --install
@remoharsono
remoharsono / example_image_utils.py
Created March 16, 2019 12:50 — forked from turicas/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@remoharsono
remoharsono / supervisord.conf
Created March 20, 2019 08:01 — forked from lenciel/supervisord.conf
supervisor configuration file for sentry
;Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
;
; Put this file in /etc/supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
@remoharsono
remoharsono / instagram_mine.py
Created April 18, 2019 02:17 — forked from rubinovitz/instagram_mine.py
A python script for downloading all of the instagram photos of a certain hashtag I wrote for a friend in 20 minutes (forgive sloppiness). Warning: you're only allowed 30 API requests an hour. Requires your own access token set as environment variable "access_token".
from datetime import datetime
import urllib2
import urllib
import json
import os
def ajaxRequest(url=None):
"""
Makes an ajax get request.
url - endpoint(string)