This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Serve is a very simple static file server in go | |
| Usage: | |
| -p="8100": port to serve on | |
| -d=".": the directory of static files to host | |
| Navigating to http://localhost:8100 will display the index.html or directory | |
| listing file. | |
| */ | |
| package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # python 3.6+ | |
| # --- CONCATENATION VIDEO FILES WITH FFMPEG --- | |
| # Scan video by prefix then join to one file using FFMPEG | |
| # tested on Windows OS only, FFMPEG must callable in CMD (add it to OS PATH) | |
| # | |
| # example usage: | |
| # we have a video folder with files: video.mp4, video_01.mp4, video_02.mp4... (all file are same format and named with order) | |
| # | |
| # then, call this script to join these file: | |
| # python video_merge.py video.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # python 3.9 | |
| # === GOOGLE PHOTO TAKEOUT RESTORE === | |
| # | |
| # --- REQUIRED PACKAGES --- | |
| # - tzdata | |
| # - filedate | |
| # | |
| #`--- FEATURES --- | |
| # - Remove file existed in Album folder | |
| # - Set image/video created date based on .json data file or file name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install requests: pip install requests | |
| # --- | |
| # This script using to reboot XClaim router (tested with model: Xi-2) | |
| # Author: thang[at]camratus.com | |
| import requests | |
| import os | |
| import time | |
| from urllib3.exceptions import InsecureRequestWarning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Crawl vnExpress.net v-car data | |
| # required packages: html_to_json | |
| from typing import Optional | |
| import html_to_json | |
| import html | |
| import requests | |
| import datetime | |
| import logging | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import ldap | |
| import os | |
| DEFAULT_SERVER = os.getenv("LDAP_SERVER") if os.getenv("LDAP_SERVER") else "127.0.0.1" | |
| LDAP_PORT = os.getenv("LDAP_PORT") if os.getenv("LDAP_PORT") else "389" | |
| LDAP_PROTOCOL = "ldaps" if os.getenv("LDAP_PROTOCOL") in ('1', 'true', 'True', 't') else "ldap" | |
| def check_authenticate(address, username, password) -> bool: | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { | |
| var aa *int | |
| var bb *string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # python version 3.5 | |
| import os | |
| import json | |
| import sys | |
| import traceback | |
| import ast | |
| import inspect | |
| from functools import partial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo OFF | |
| rem https://patorjk.com/software/taag/#p=display&c=echo&f=Small%20Slant&t=GIT%20PUSH | |
| echo _______________ ___ __ ________ __ | |
| echo / ___/ _/_ __/ / _ \/ / / / __/ // / | |
| echo / (_ // / / / / ___/ /_/ /\ \/ _ / | |
| echo \___/___/ /_/ /_/ \____/___/_//_/ | |
| set "dummy=" | |
| set /p DUMMY=Hit ENTER to continue... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # Create: 16-02-2022 for Python 2.7 | |
| # Author: nothingctrl (nothingctrl@gmail.com) | |
| # --------------------------------------------------------------------------------------------------------------------- | |
| # Detect mail server (Zimbra) inject by miner virus name `kinsing` | |
| # this virus use all CPU resource and have some behaviour: | |
| # - Create a crontab as zimbra to download .sh script using wget | |
| # - Download / create execute file in /var/tmp, /tmp, /opt/zimbra/log/ | |
| # - Run process with name: `kinsing...`, `kdevtmpfsi...` | |
| # - In log file `/opt/zimbra/log/zmmailboxd.out`, every time virus file create, have a log: `/opt/zimbra/log/kinsing...` |