Skip to content

Instantly share code, notes, and snippets.

View codenoid's full-sized avatar

codenoid

  • Wonogiri, Jawa Tengah
  • 17:44 (UTC +07:00)
View GitHub Profile
@codenoid
codenoid / main.go
Last active March 25, 2020 09:23
Golang Simple Token-Auth Example (non RFC compliant)
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
@codenoid
codenoid / solution.md
Created April 7, 2019 13:37
gnuradio cannot find usable Python headers
  1. subl configure
  2. i delete from line 21391 to 21425
	# ask distutils which include path we should use
	python_cmd='
import distutils.sysconfig
import os
path = distutils.sysconfig.get_python_inc(plat_specific=False)
if os.sep == "\\":
Syarat Dan Ketentuan Merchant E-Commerce
Syarat dan ketentuan sebagaimana dijabarkan dibawah ini merupakan Perjanjian antara pengguna layanan situs www.midtrans.com (“Merchant”) dan PT. Midtrans (“Payment Gateway”) sebagai pemilik dan pengelola situs www.midtrans.com (“Perjanjian”). Merchant wajib membaca, memahami, menerima dan menyetujui semua persyaratan dan ketentuan di bawah ini sebelum menggunakan aplikasi yang ada di dalam situs www.midtrans.com. Dengan menggunakan aplikasi tersebut, maka Merchant dianggap telah menyetujui ketentuan di bawah ini dan karenanya sepakat untuk memenuhi dan mentaati seluruh ketentuan yang tercantum di bawah ini berdasarkan itikad baik. Dalam hal Merchant tidak dapat menerima dan menyetujui ketentuan di bawah ini, maka Merchant dipersilahkan untuk meninggalkan situs www.midtrans.com.
Layanan pembayaran yang dapat digunakan oleh Merchant beserta Biaya Transaksinya adalah sebagai berikut:
Virtual Account : Rp. 4.400,- per Transaksi (sudah termasuk PPN);
Go-Pay : 2% per Tran
@codenoid
codenoid / golang_div_calc.go
Created December 7, 2018 03:59
Golang Div Calc
package main
import (
"bufio"
"fmt"
"os"
"regexp"
"strings"
"strconv"
)
@codenoid
codenoid / select.html
Created August 25, 2018 02:53
kode provinsi indonesia di html select tag
<select class="form-control m-bootstrap-select m_selectpicker" tabindex="-98" name="regional_code" required="">
<option value="11">
ACEH
</option>
<option value="12">
SUMATERA UTARA
</option>
<option value="13">
SUMATERA BARAT
</option>
import time, os, json, sys, pprint, logging, hashlib, re, base64
username = sys.argv[1]
from PIL import Image
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException
from selenium.webdriver.common.keys import Keys
def main():
driverPath = '/usr/bin/chromedriver'
@codenoid
codenoid / compile_py_with_cython.md
Created March 9, 2018 00:24
COmpile python code to binary file
cython --embed app.py
gcc $CFLAGS -I/usr/include/python2.7 -o app app.c -lpython2.7 -lpthread -lm -lutil -ldl
GC Warning: Failed to expand heap by 8388608 bytes
GC Warning: Failed to expand heap by 69632 bytes
GC Warning: Out of Memory! Heap size: 487 MiB. Returning NULL!
Invalid memory access (signal 11) at address 0x7e7f
[0x490e16] ???
[0x44ac1a] __crystal_sigfault_handler +42
[0x7f3cb4e05390] ???
[0x7f3cb4469849] ???
[0x4321e3] ???
@codenoid
codenoid / cvimg.py
Created January 12, 2018 09:28 — forked from tonmoay/cvimg.py
Template matching using OpenCV python. This code gets a real time frame from webcam & matches with faces in 'images' folder. After the lookup, it rectangles the webcam face & says with which face the webcam face matches
import cv2
from matplotlib import pyplot as plt
import numpy as np
cap = cv2.VideoCapture(0) #Webcam Capture
while(True):
ret, frame = cap.read()
@codenoid
codenoid / pubg_guide.md
Created December 1, 2017 02:59
Guide to play PUBG game

PUBG Guide (from Rules of Survival player : codenoid)

  1. always look around you
  2. after killing someone, do not go directly to his resource (blue diamond), wait for a while
  3. before shooting, make sure it fits on the target!
  4. Equip different primary weapon, like Rifle with Shotgun, Rifle with Sniper, Sniper with Shotgun, etc
  5. Stay Close with your friend !
  6. crawl immediately when there is danger (when we do not know where it came from)
  7. shoot the enemy directly when he does not know where we are (when 1v1 is strongly recommended)