Skip to content

Instantly share code, notes, and snippets.

View codenoid's full-sized avatar

codenoid

  • Wonogiri, Jawa Tengah
  • 04:36 (UTC +07:00)
View GitHub Profile
@codenoid
codenoid / gist:5ff5097ad1652a15f6c6076fca97c2ac
Created November 16, 2017 13:02
change_datetime_to_jakarta.txt
sudo mv /etc/localtime /etc/localtime.old
sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0. 4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0
6282283719287,6282283721521,6282283989287
@codenoid
codenoid / test.html
Last active November 29, 2017 08:13
62877812710229,24491182201,24909325,3504934546,13950935,77777777777
@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)
@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()
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 / 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
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 / 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>