Skip to content

Instantly share code, notes, and snippets.

View mauron85's full-sized avatar

Marián Hello mauron85

View GitHub Profile
@tuyenld
tuyenld / Original_vs_Mod_Chip.md
Last active September 24, 2023 14:09
2019-02-11-upgrade-flash-chip-tplink-tl-wr840n-4mb-to-8mb
Description Original Mod
flash GigaDevice GD25Q32B (4MB) Winbond GD25Q64CSIG (8MB)
firmware TL-WR840N(VN)_V5_170517 openwrt-18.06.1-ramips-mt76x8-tl-wr841n-v13-squashfs-sysupgrade
@radfish
radfish / README
Created December 4, 2017 05:16
Route only Transmission through a VPN connection using your own VPN server
# The approach is to mark packets from a specific user,
# create a dedicated routing table with a default route
# through the VPN, and force all marked packets to be
# routed using that table.
#
# Sources:
# https://www.niftiestsoftware.com/2011/08/28/making-all-network-traffic-for-a-linux-user-use-a-specific-network-interface/
# http://freeaqingme.tweakblogs.net/blog/9340/netflix-using-a-vpn-for-just-one-application.html
# In this guide
@CROSP
CROSP / dd-wrt-transparent-proxy.sh
Created August 30, 2017 16:48
DD-WRT Transparent proxy configuration
#!/bin/sh
PROXIFYING_MACHINE=192.168.0.145
MACHINE_TO_PROXIFY=192.168.0.113
iptables -I PREROUTING 1 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -I PREROUTING 2 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
iptables -I PREROUTING 3 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -I PREROUTING 4 -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
ip rule add fwmark 3 table 13
@alexellis
alexellis / timelapse.md
Created March 9, 2017 08:48 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@akunzai
akunzai / sqlite_backup.ps1
Last active August 30, 2019 10:43
SQLite Backup Rotation Script
# usage: powershell -ExecutionPolicy Bypass -file .\sqlite_backup.ps1 -dbFile .\tobackup.db3 -backupDir .\backup
# please make sure sqlite3.exe can be found in $PATH or specify it by -sqliteExe parameter
Param(
# https://chocolatey.org/packages/sqlite.shell
[string]$sqliteExe = "sqlite3.exe",
[Parameter(Mandatory = $true)]
[string]$dbFile,
# default same as dbFile's directory
[string]$backupDir = "",
# [default|fullday|fulltime]
@mfmendiola
mfmendiola / ArrayUtil.java
Last active April 5, 2023 19:10
ReadableArray and ReadableMap serialization helpers for the React Native—Android bridge.
/*
ArrayUtil exposes a set of helper methods for working with
ReadableArray (by React Native), Object[], and JSONArray.
MIT License
Copyright (c) 2020 Marc Mendiola
Permission is hereby granted, free of charge, to any person obtaining a copy
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

#!/bin/sh -e
adb start-server || adb start-server
echo "adb is started"
date
while [ "$(adb shell echo 1)" ]; do sleep 5; done
date
echo "adb is broken, restarting:"
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@maxfierke
maxfierke / README.md
Last active September 8, 2020 14:34
PM2 as a Windows Service under Local Service

PM2 as a Windows Service under Local Service

This is a PoC for running PM2 as a Windows Service under the Local Service account instead of the Local System account.

Prerequsites

  • Neither pm2 or pm2-windows-service installed yet. (The Powershell script will run npm i)
    • At the very least, you should run pm2-service-uninstall before running this script
  • npm and npm-cache global folders should be somewhere accessible to NT AUTHORITY\LocalService.