Skip to content

Instantly share code, notes, and snippets.

View kittinan's full-sized avatar
🇹🇭
|||

Kittinan kittinan

🇹🇭
|||
View GitHub Profile
@thomasdarimont
thomasdarimont / docker-compose.yml
Created January 25, 2019 17:52
Docker OpenLDAP + phpldapadmin example
version: '2'
services:
openldap:
image: osixia/openldap:1.2.3
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org"
LDAP_BASE_DN: ""
// start with:
// frida -U -l pinning.js -f [APP_ID] --no-pause
Java.perform(function () {
console.log('')
console.log('===')
console.log('* Injecting hooks into common certificate pinning methods *')
console.log('===')
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager');
@TridentTD
TridentTD / BlynkServer_Free.txt
Last active December 14, 2024 19:13
BlynkServer Free (more than 100,000 energy)
รวม Blynk Server ฟรี ที่
จะได้ Energy แบบเหลือเฟือใช้สะดวก
ใครมีเพิ่มเติม แจ้งเพิ่มได้เลยนะครับ
รวมไว้ที่เดียวกัน
#update 11 December 2018 @ 10:00
Total : 7 Free Blynk Server
----------------------------------------------------
1.
@korakot
korakot / install.py
Last active February 16, 2019 11:55
thpronun wrapper for use in python
!apt install libthai-dev help2man
!wget ftp://linux.thai.net/pub/thailinux/software/thpronun/thpronun-0.2.0.tar.xz
!tar xf thpronun-0.2.0.tar.xz
%cd thpronun-0.2.0
!./configure --prefix=/usr
!make
!make install
@MKagesawa
MKagesawa / docker-compose.yml
Created August 21, 2018 08:07
Docker-compose MySQL Image create multiple databases
# The official MySQL (https://hub.docker.com/_/mysql/) supports only one MYSQL_DATABASE environment variable.
# By modifying the entrypoint and passing shell script, you can create multiple dbs without having to make a mysql image just for this purpose.
version: '3'
services:
# Some other service connecting to mysql
db:
image: mysql:5.6
@ubergesundheit
ubergesundheit / readme.md
Last active April 17, 2025 16:30
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

Thai songs similarity (experiment)

Create affinity matrix from Thai songs' spectogram

import os
import cv2
from skimage.measure import compare_ssim

dir_name = '/path/to/thaisongs/'
@titipata
titipata / convert_spectogram.md
Last active May 4, 2018 09:02
Convert MP4 to Spectogram

Convert files in MP4 folder to FLAC

Scipt to convert

import os
from glob import glob
import subprocess

MP4_PATH = '~/Desktop/notebooks/mp4/*.m4a' # path to all mp4 files
@rluts
rluts / token_auth.py
Last active April 10, 2025 16:38
Token authorization middleware for Django Channels 2
from channels.auth import AuthMiddlewareStack
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import AnonymousUser
from django.db import close_old_connections
class TokenAuthMiddleware:
"""
Token authorization middleware for Django Channels 2
"""
@kittinan
kittinan / client.py
Last active March 26, 2025 08:29
Python OpenCV webcam send image frame over socket
import cv2
import io
import socket
import struct
import time
import pickle
import zlib
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('192.168.1.124', 8485))