Skip to content

Instantly share code, notes, and snippets.

@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active May 12, 2024 19:26
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@SavageCore
SavageCore / 1-readme.md
Last active May 12, 2024 19:25 — forked from cdleveille/Install⁄Update Xone
Install or update xone driver for Steam Deck (desktop shortcut and bash script)

Enjoying this script? Consider buying me a beer/coffee!

ko-fi

First time setting up your Deck? You may enjoy my setup guide. It'll get you started on Emulation.

Improvements

Main changes at initial release versus cdleveille's original script:

  • Added zenity for a basic "GUI"
@rshorey
rshorey / voterfiles.md
Last active May 12, 2024 19:25
So you want to report using voterfiles

So you want to report using voterfiles

History

In 2002, the Help America Vote Act required (among other things) that states must maintain a "computerized statewide voter registration list". These lists (henceforth "voterfiles") contain information about every registered voter and their voting history.

But what about the secret ballot?

When people who have not worked with voterfile data before hear about voterfiles, their first response is almost always "But in my 8th grade civics class, I learned that a critical component of American democracy is the secret ballot! How can states have a list of how you vote?" Voterfiles do NOT include information about how an individual voted. They report whether an individual voted in a specific election.

What information do voterfiles contain?

The exact format and contents of a publicly available voterfile differ from state to state. At a minimum, a file will contain:

You will need ssh access to your USG. I suggest running sudo su so you're the root user throughout

Installation

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your USG's processor.
curl https://pkgs.tailscale.com/stable/tailscale_1.36.1_mips64.tgz | tar xvz -C /tmp
mv /tmp/tailscale_1.36.1_mips64 /config/tailscale
@abdielsudiro
abdielsudiro / pybitbalance.py
Created May 12, 2024 19:21 — forked from Qalander/pybitbalance.py
Python script for Bitcoin addresses bulk balance checking.
import argparse
import urllib3
from urllib3 import util
import json
import math
LIMIT = 120
SATOSHI = 1e+8
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@bmaupin
bmaupin / free-backend-hosting.md
Last active May 12, 2024 19:17
Free backend hosting
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active May 12, 2024 19:12
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@zmts
zmts / tokens.md
Last active May 12, 2024 19:11
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 12, 2024 19:11
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example