Skip to content

Instantly share code, notes, and snippets.

@jackthailand
jackthailand / dns-dhcp.bat
Created July 15, 2018 13:26 — forked from programmarchy/dns-dhcp.bat
Batch files for switching DNS servers between Google (8.8.8.8, 8.8.4.4) and DHCP
REM
REM Usage:
REM dns-dhcp.bat
REM
REM Description:
REM Configures DNS Servers with DHCP on interfaces listed below.
REM
REM To change interfaces, replace "name" with your interface names, or use "index" instead.
REM
REM To list the names and indices of your interfaces, run:
@jackthailand
jackthailand / thai-id-card.py
Created June 2, 2018 18:05 — forked from bouroo/thai-id-card.py
Thai National ID Card reader in python
#!/usr/bin/env python
# bouroo
# 18.08.2017
# sudo apt-get -y install pcscd python-pyscard python-imaging
import os
import io
import Image
import binascii
from smartcard.System import readers
@jackthailand
jackthailand / class.database.php
Created July 22, 2017 08:51 — forked from jonashansen229/class.database.php
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";
@jackthailand
jackthailand / 0_reuse_code.js
Created June 24, 2017 15:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console