Skip to content

Instantly share code, notes, and snippets.

View goldalworming's full-sized avatar

arief nur andono goldalworming

View GitHub Profile
@goldalworming
goldalworming / facebook.py
Created April 29, 2018 14:51 — forked from phwd/facebook.py
Tornado example of posting to a page (Doesn't handle duplicate posts #506)
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@goldalworming
goldalworming / activerecord-benchmarks.csv
Created March 4, 2018 21:48 — forked from epitron/activerecord-benchmarks.csv
CockroachDB vs PostgreSQL vs MySQL vs SQLite
activerecord-cockroachdb activerecord-postgresql activerecord-mysql activerecord-sqlite Benchmark
9.216770* (60720k) 9.590111 (60984k) 12.455487 (69168k) 18.465701 (64944k) Model Object Creation: 3200 objects (No Transaction)
0.900417 (0k) 0.893337 (0k) 0.832904 (0k) 0.707108* (0k) Model Object Creation: 3200 objects (Transaction)
2.031437* (337128k) 2.070499 (336864k) 2.181665 (332112k) 2.215748 (333432k) Model Object Select: 6400 objects 64 times (No Transaction)
2.004822 (0k) 1.984105* (0k) 2.121498 (264k) 2.175031 (0k) Model Object Select: 6400 objects 64 times (Transaction)
3.460825 (0k) 3.337974 (0k) 3.875209 (0k) 2.622881* (0k) Model Object Select PK: 640 objects 64 times (No Transaction)
3.372082 (0k) 3.247312 (0k) 3.786783 (0k) 2.253132* (0k) Model Object Select PK: 640 objects 64 times (Transaction)
3.594136 (0k) 3.431209 (0k) 4.428752 (0k) 2.679963* (0k) Model Object Select Hash: 640 objects 64 times (No Transaction)
3.473371 (0k) 3.358583 (0k) 3.800874 (0k) 2.409768* (0k) Model Object Select Hash:

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

<div class="_4t2a"><div style="opacity: 1;"><div><div class="_4-i0"><div class="clearfix"><div class="_51-u rfloat _ohf"><a class="_42ft _5upp _50zy layerCancel _51-t _50-0 _50z-" role="button" href="#" title="Close" tabindex="0">Close</a></div><div><h3 id="u_2l_0" class="_52c9">Message Sent</h3></div></div></div><div class="_4-i2 _pig _50f4">Your message was successfully sent.</div></div></div></div>
@goldalworming
goldalworming / cobalt2.json
Created October 1, 2017 23:21
make cobalt2 vscode similar to cobalt sublime text
{
"$schema": "vscode://schemas/color-theme",
"name": "Cobalt",
"type": "dark",
"colors": {
// activityBar
"activityBar.background": "#122738",
"activityBar.border": "#0d3a58",
"activityBar.dropBackground": "#0d3a58",
"activityBar.foreground": "#fff",
@goldalworming
goldalworming / GoogleMapDownloader.py
Created May 25, 2016 03:43 — forked from eskriett/GoogleMapDownloader.py
A python script to download high resolution Google map images given a longitude, latitude and zoom level.
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib
import Image
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# 1. Download SVG
if [ ! -f logo.svg ]; then
curl https://www.python.org/static/community_logos/python-logo-inkscape.svg > logo.svg
fi
# -----------------------------------------------------------------------------
http://themeforest.net/item/electric-admin-panel-dashboard-angular-js-template/14879635?s_rank=5
http://codepen.io/shye0000/pen/oXKBgY (add to cart effect angularjs)
https://github.com/pierrre/imageserver
@goldalworming
goldalworming / check.go
Created April 11, 2016 07:47 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); err == nil {
// path/to/whatever exists
}