Skip to content

Instantly share code, notes, and snippets.

Remo Harsono remoharsono

  • Oprent
  • Indonesia
Block or report user

Report or block remoharsono

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
@remoharsono
remoharsono / instagram_mine.py
Created Apr 18, 2019 — 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".
View instagram_mine.py
from datetime import datetime
import urllib2
import urllib
import json
import os
def ajaxRequest(url=None):
"""
Makes an ajax get request.
url - endpoint(string)
@remoharsono
remoharsono / supervisord.conf
Created Mar 20, 2019 — forked from lenciel/supervisord.conf
supervisor configuration file for sentry
View supervisord.conf
;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 / example_image_utils.py
Created Mar 16, 2019 — forked from turicas/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
View example_image_utils.py
#!/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 / install-vsftpd-ubuntu.txt
Last active Mar 4, 2019
Install VSFTPd on Ubuntu
View install-vsftpd-ubuntu.txt
# My steps in installing vsftpd, modify to suit your need
sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ssl/private/vsftpdserverkey.pem -out /etc/ssl/certs/vsftpdcertificate.pem -days 365
sudo apt install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.original
sudo nano /etc/vsftpd.conf
--------------
anonymous_enable=NO
@remoharsono
remoharsono / .md
Created Mar 3, 2019 — forked from blagoeres/.md
⭐️ Frontend tooling & development environment for OS X
View .md

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 / Enable HTTP2 (h2) in NGINX.md
Created Mar 3, 2019 — forked from blagoeres/Enable HTTP2 (h2) in NGINX.md
🌟 Hypertext Transfer Protocol Version 2 (HTTP/2) in NGINX ⭐️
View Enable HTTP2 (h2) in NGINX.md
@remoharsono
remoharsono / twitter_follower_list.py
Created Feb 12, 2019
List your twitter followers
View twitter_follower_list.py
import requests
from bs4 import BeautifulSoup
headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19',
}
def get_next(url, start_number, num_pages, page_number):
response = requests.get(url, headers=headers)
@remoharsono
remoharsono / request.php
Created Feb 10, 2019
PHP cURL - Set User Agent as Google Bot
View request.php
<?php
// taken from: https://github.com/izniburak/google-bot-curl/blob/master/google-bot.php
function googleBot($url)
{
$header = array();
$header[] = 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';
$header[] = 'Cache-Control: max-age=0';
$header[] = 'Content-Type: text/html; charset=utf-8';
$header[] = 'Transfer-Encoding: chunked';
View 0-startup-overview.md
@remoharsono
remoharsono / sendmail.go
Created Dec 28, 2018
Send email using via Mailgun API using Go
View sendmail.go
package main
import (
"fmt"
"log"
mailgun "github.com/mailgun/mailgun-go"
)
var mailgunDomain = "yourdomain.com"
You can’t perform that action at this time.