Skip to content

Instantly share code, notes, and snippets.

@bjmiller121
bjmiller121 / multiple-push-urls.md
Last active September 29, 2025 04:07
Add multiple push URLs to a single git remote

Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.

Once you have a remote set up for one of your upstreams, run these commands with:

git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]

Once set up, git remote -v should show two (push) URLs and one (fetch) URL. Something like this:

@yang-wei
yang-wei / guide.md
Created October 8, 2015 12:49
mysql import and export
@andrew-aladev
andrew-aladev / 7bit_hex_to_char.c
Last active August 7, 2024 19:09
Openwrt + Huawei E367 + balance of mts.by with bash and c
#include <stdint.h>
#include <stdio.h>
#include <string.h>
uint8_t get_data(char input, uint8_t *output) {
if (input - '0' >= 0 && '9' - input >= 0) {
*output = input - '0';
} else if (input - 'a' >= 0 && 'f' - input >= 0) {
*output = input - 'a' + 10;
} else if (input - 'A' >= 0 && 'F' - input >= 0) {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <search.h>
#define cons(X,Y) new_list((void *) X, Y)
/* Definition of data structures */
typedef struct list{
void *data;
struct list *next;
@lonelymtn
lonelymtn / mirror-port.sh
Created February 4, 2016 23:28
Mirror traffic between two interfaces using Linux's traffic controll subsystem (tc)
#!/usr/bin/env bash
# Time-stamp: <2014-07-31 13:31:43 (ryanc)>
#
# Description: Mirror traffic between two interfaces using Linux's
# traffic control subsystem (tc)
trap cleanup EXIT
CLEANUP=1
SRC_IFACE=$1
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active November 21, 2025 07:55
Vanilla JavaScript Quick Reference / Cheatsheet
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active December 27, 2025 05:36 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@fffx
fffx / NERDTree.mkd
Last active September 2, 2024 13:00 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active September 2, 2024 14:37
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@fffx
fffx / README.md
Created August 4, 2016 14:08 — forked from hofmannsven/README.md
My simply Git Cheatsheet