Skip to content

Instantly share code, notes, and snippets.

View thienandangthanh's full-sized avatar

Thien An Dang Thanh thienandangthanh

View GitHub Profile
//Look for other responsivevoice instances
/*if (window.parent != null) {
var iframes = window.parent.document.getElementsByTagName('iframe');
for (var i = 0; i < iframes.length; i++) {
//iframes[i].style.width = "300px"
}
}*/
if (typeof responsiveVoice != 'undefined') {
console.log('ResponsiveVoice already loaded');
@thienandangthanh
thienandangthanh / SIM800A-MQ2-Buzzer.ino
Last active November 22, 2018 02:25
A gas alert application using Arduino UNO R3, module SIM800A, MQ2 gas sensor, Buzzer and LED
// SIM800A-MQ2-Buzzer.ino
/*
Sơ đồ nối chân
SIM800A Arduino UNO
TX 2
RX 3
Power 4
VCC VCC
GND GND
// TB6560-control-2-steppers.ino
// Thư viện điều khiển động cơ bước
// Cần phải thêm thư viện AccelStepper trước khi sử dụng
// Hướng dẫn tải thư viện về tại đây:
// https://www.stdio.vn/articles/cai-dat-thu-vien-tren-arduino-ide-531
// Tham khảo thêm tại https://www.pjrc.com/teensy/td_libs_AccelStepper.html
#include <AccelStepper.h>
/*
@thienandangthanh
thienandangthanh / Multi-split.py
Created December 16, 2018 15:17
Spliting mp3 file in to multiple files with different lenghts defined in CSV file with ffmpeg
#!/usr/bin/python
from argparse import ArgumentParser
import csv, sys, subprocess, os.path
def main(argv):
parser = ArgumentParser(description='A tool spliting mp3 file in to multiple files with different lenghts defined in CSV file',
epilog="Example: multi-split.py 00:00:25.500,00:00:27.500 test.mp3")
parser.add_argument('input_audio', help='source file to split')
parser.add_argument('CSV_file', help='file contains: start, stop time, ouput file name')
args = parser.parse_args()
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
// ==UserScript==
// @name Zalo - Dark Mode
// @namespace http://userstyles.org
// @description For chat.zalo.me
// @author Thien An Dang Thanh
// @homepage
// @include http://chat.zalo.me/*
// @include https://chat.zalo.me/*
// @include http://*.chat.zalo.me/*
// @include https://*.chat.zalo.me/*