Skip to content

Instantly share code, notes, and snippets.

View lovmoon3k's full-sized avatar
💭
I may be slow to respond.

LovMoon3k lovmoon3k

💭
I may be slow to respond.
View GitHub Profile
@automagictv
automagictv / automatic_invoice.gs
Created February 5, 2021 21:13
Apps Script code to automatically replace template variables in your invoice document.
///////////////////////////////////////////////////////////////////////////////////////////////
// BEGIN EDITS ////////////////////////////////////////////////////////////////////////////////
const TEMPLATE_FILE_ID = 'YOUR_TEMPLATE_FILE_ID_HERE';
const DESTINATION_FOLDER_ID = 'YOUR_DESTINATION_FOLDER_ID_HERE';
const CURRENCY_SIGN = '$';
// END EDITS //////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: EDITING ANYTHING BELOW THIS LINE WILL CHANGE THE BEHAVIOR OF THE SCRIPT. //////////
@exocode
exocode / Quadcopter.md
Created January 3, 2021 19:55
My personal cheat sheet for UAV FPV and Betaflight. Everything you need!

Quadcopter and Betaflight cheat sheet

Introduction

On my yourney though hundreds of videos, tutorials and manuals (Bardwell, UAV Tech, JohnnyFPV, Mr. Steele, Le Drib, RotorRiot (sorry, for the missed ones) and wrote down their suggestions). This is the result of my notes. It should provide the least necessary but most compressed information to start tuning and setting your Quadcopter. In my case I use the widely spread Taranis X7 remote control.

I am a freestyle pilot, so keep in mind, that these settings are in this scope (more smooth, softer flight behaviour).

Remote Control (Taranis X7)

@coderofsalvation
coderofsalvation / crossfadevideo.sh
Last active September 11, 2024 14:12
ffmpeg commandline crossfade-looped video
#!/bin/bash
[[ ! -n $3 ]] && { echo "Usage: crossfadevideo <input.mp4> <fade in seconds> <output.mp4> [looptimes]"; exit; }
input="$1"
fade="$2"
duration="$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$input")"
duration=$(echo "$duration-($fade)" | bc | sed 's/\..*//g')
[[ ${duration:0:1} == "." ]] && duration="0$duration"
output="$3"
[[ -n $4 ]] && loop=$4 && output="${output}.mkv"
set -x
@yasinkuyu
yasinkuyu / cloudflare_bypass.php
Created November 2, 2020 11:39
PHP CURL function which bypasses the Cloudflare
<?php
/*
PHP CURL function which bypasses the Cloudflare
@yasinkuyu
*/
function cloudFlareBypass($url){
$useragent = "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z‡ Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";
@KangHidro
KangHidro / banks.md
Last active October 3, 2024 15:40
Đăng ký tài khoản ngân hàng để tối ưu trải nghiệm sử dụng và các loại phí

Đăng ký tài khoản ngân hàng để tối ưu trải nghiệm sử dụng và các loại phí

Link bài viết này (để copy cho nhanh ý mà :v): http://bit.ly/optimizeBanks

  • Cách mình trình bày dưới đây chỉ mang tính chất chia sẻ kinh nghiệm nhé!
  • Tuy các giao dịch mình làm qua app, online, ít khi phải ra ngân hàng nhưng vì giờ đa số các ngân hàng đã miễn hầu hết các loại phí nên mình sẽ bàn thêm về trải nghiệm CSKH và một số tiện ích khác nữa.
  • Chắc chắn tuỳ khu vực sẽ có "chỗ this chỗ that" rồi, nên nếu bạn ưng bụng ngân hàng nào trước rồi thì cứ dùng thôi nhé!

TLDR → BÀI KHÁ DÀI, NẾU KHÔNG MUỐN ĐỌC HẾT THÌ MÌNH SẼ CHỌN NHANH COMBO CHO BẠN

@ethicnology
ethicnology / bloatware-remover-redmi-note-9-s.sh
Created August 30, 2020 14:07
bloatware remover for xiaomi redmi note 9 s
# inspired by https://selivan.github.io/2020/02/25/removing-bloatware-from-xiaomi-miui-android.html
pm uninstall --user 0 com.xiaomi.mipicks #GetApps - app store like Google Play from Xiaomi. The most annoying one, periodically shows advertisement.
pm uninstall --user 0 com.miui.msa.global #MIUI Ad Services - also responsible for showing ads.
pm uninstall --user 0 com.miui.cloudservice #Cloud
pm uninstall --user 0 com.miui.cloudbackup #Cloud Backup
pm uninstall --user 0 com.xiaomi.glgm #Games
pm uninstall --user 0 com.xiaomi.payment #Mi Credit
pm uninstall --user 0 cn.wps.xiaomi.abroad.lite #Mi DocViewer(Powered by WPS Office)
pm uninstall --user 0 com.xiaomi.midrop #Mi ShareMe
pm uninstall --user 0 com.miui.yellowpage #Mi YellowPages
@oofnikj
oofnikj / answerfile
Last active April 22, 2025 09:28
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
/**
* @author hypnguyen1209
*/
/* Switch to new Facebook */
(()=>{let e=document.querySelectorAll('[data-type="type_user"]')[0].dataset.navItemId,t=document.getElementsByName("fb_dtsg")[0].value;fetch("https://www.facebook.com/comet/try/",{headers:{accept:"*/*","accept-language":"vi-VN,vi;q=0.9,fr-FR;q=0.8,fr;q=0.7,en-US;q=0.6,en;q=0.5","content-type":"application/x-www-form-urlencoded","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","viewport-width":"1920"},referrer:"https://www.facebook.com/",referrerPolicy:"origin-when-cross-origin",body:`source=SETTINGS_MENU&nctr[_mod]=pagelet_bluebar&__user=${e}&__a=1dpr=1&fb_dtsg=${encodeURIComponent(t)}`,method:"POST",mode:"cors",credentials:"include"}).then(()=>console.log("Done!")).catch(e=>console.error(e))})();
/* Switch to classic Facebook */
(()=>{let e=document.body.getElementsByTagName("script")[6].innerText.match(/\"USER_ID\":\"(.*?)\",\"/m)[1];let t=(()=>{let e=document.body.getElementsByTagName("script");for(let t=0;t<e.leng
@huoshan12345
huoshan12345 / encrypt.cs
Last active April 15, 2025 13:45
Instagram enc_password generator in C#
// Packages need to be installed:
// Sodium.Core
// System.Security.Cryptography.Algorithms
// The values of publicKey,keyId,version are from shared_data.
// You need to call https://www.instagram.com/data/shared_data/ to get shared_data first
public static string GenerateEncPassword(string password, string publicKey, string keyId, string version)
{
var time = DateTime.UtcNow.ToTimestamp(); // Unix timestamp
var keyBytes = publicKey.HexToBytes(); // Convert a hex string to a byte array
@stvar
stvar / youtube-search.py
Last active June 20, 2023 14:23
Find YouTube channel IDs by custom URLs or user names
#!/usr/bin/python3
# Copyright (C) 2020 Stefan Vargyas
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: