Skip to content

Instantly share code, notes, and snippets.

View Napat's full-sized avatar

Napat Rungruangbangchan Napat

  • Thailand
View GitHub Profile
```
videos = document.getElementsByTagName("video");
for(var i = 0; i < videos.length; i++){
videos[i].playbackRate = 2;
}
```
https://steve-condylios.medium.com/how-to-change-the-speed-of-a-facebook-video-bb09346d15b9
DUC17mqXBiApZqYN43QF8hYMhotBdYyf6N
@Napat
Napat / self-signed-certificate-with-custom-ca.md
Created December 31, 2019 13:43 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@Napat
Napat / line-api-playgroud.json
Created August 28, 2018 05:12 — forked from tandevmode/line-api-playgroud.json
NodeRED flow of LINE API Playground
[
{
"id": "b1fd7946.f6a0c8",
"type": "http in",
"z": "9295d104.785ef",
"name": "",
"url": "/playground/api",
"method": "post",
"upload": false,
"swaggerDoc": "",
#include<stdio.h>
//// Begin copy //////////////////////
#ifndef GENMASK
#ifndef U32_C
#define U32_C(x) x ## U
#endif /* U32_C */
/*
Aug 9 07:29:22 pokemonGo journal: Download https://repo1.maven.org/maven2/org/jboss/shrinkwrap/shrinkwrap-bom/1.2.2/shrinkwrap-bom-1.2.2.pom
Aug 9 07:29:22 pokemonGo journal: Download https://repo1.maven.org/maven2/org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-bom/2.1.1/shrinkwrap-resolver-bom-2.1.1.pom
Aug 9 07:29:23 pokemonGo journal: Download https://repo1.maven.org/maven2/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-bom/2.0.0-alpha-7/shrinkwrap-descriptors-bom-2.0.0-alpha-7.pom
Aug 9 07:29:23 pokemonGo journal: Download https://repo1.maven.org/maven2/org/springframework/spring-aop/4.2.7.RELEASE/spring-aop-4.2.7.RELEASE.pom
Aug 9 07:29:23 pokemonGo journal: Download https://repo1.maven.org/maven2/org/springframework/spring-beans/4.2.7.RELEASE/spring-beans-4.2.7.RELEASE.pom
Aug 9 07:29:23 pokemonGo journal: Download https://repo1.maven.org/maven2/org/springframework/spring-expression/4.2.7.RELEASE/spring-expression-4.2.7.RELEASE.pom
Aug 9 07:29:23 pokemonGo journal: Download https://re
@Napat
Napat / gotourCrawler.go
Last active May 11, 2016 19:11
go tour crawler
package main
import (
"fmt"
"sync"
"time"
)
type crawlData struct {
url string
#define UDP_MSGQ_GPON_PORT 7065
#define UDP_MSGQ_GPON_COMM_PORT 7066
#define UDP_MSGQ_GPON_MIP_CTRL_MSG_IDEN 108
#define UDP_MSGQ_GPON_INTERFACE "eth0.4091"
struct udpMsgQKey key;
struct udpMsgQ msgq;
int Init_msgQ(void) {
msgq.port = UDP_MSGQ_GPON_COMM_PORT; //send to port
@Napat
Napat / Messy.py
Created October 7, 2015 06:44
python messy try except block
def td_apply_cmd(credential):
global err_count
ms = 0
try:
(ip, username, password, cmd_file, ms_str) = re.findall(r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(.+):(.+):(.+):(.+)", credential)[0]
ms = int(ms_str)
except IndexError:
try:
(ip, username, password, cmd_file) = re.findall(r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(.+):(.+):(.+)", credential)[0]
cmd_file = cmd_file.rstrip(":")