Skip to content

Instantly share code, notes, and snippets.

View doronbehar's full-sized avatar

Doron Behar doronbehar

View GitHub Profile
@sxiii
sxiii / p2p-vpns.md
Created September 10, 2021 07:13
P2P VPN List
@sorki
sorki / configuration.nix
Created August 25, 2020 14:13
rpi cross
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>
];
nixpkgs = {
crossSystem.system = "armv7l-linux";
};
@vsajip
vsajip / app.py
Created October 16, 2018 11:13
CLI starter template for Python logging cookbook
import argparse
import importlib
import logging
import os
import sys
def main(args=None):
scriptname = os.path.basename(__file__)
parser = argparse.ArgumentParser(scriptname)
levels = ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')
@tmonjalo
tmonjalo / list-fftabs.py
Created September 13, 2018 10:42
List all Firefox tabs with title and URL
#! /usr/bin/env python3
"""
List all Firefox tabs with title and URL
Supported input: json or jsonlz4 recovery files
Default output: title (URL)
Output format can be specified as argument
"""
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@hlecuanda
hlecuanda / Git-Squash-Implementation.md
Last active April 7, 2024 02:46
Git Squash alias, from amazingly clean explanation on stackoverflow

From This other answer on the same thread

Based on Chris Johnsen's answer:

I added this line to the [alias] section of my git config file (~/.gitconfig):

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@renestalder
renestalder / README.md
Last active May 3, 2024 14:08
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

@smblott-github
smblott-github / _insync-headless
Last active March 16, 2018 03:06
Simple zsh completion for insync, insync-headless and insync-portable. Grab this, name it "_insync-headless" and put it in some suitable location for zsh completion functions. And good luck. Zsh completion is a mystery to me.
#compdef insync-headless insync-portable insync
if [[ $CURRENT == 2 ]]
then
_values 'commands' \
'accept_all_new_shares[Accept all new shares file to given account]' \
'accept_share[Accept shared file to given account]' \
'add_account[Add account to Insync]' \
'force_sync[Force sync item]' \
'get_account_information[Show information for connected acounts]' \
@elmotec
elmotec / bootstrap_cmdline.py
Last active December 1, 2021 17:14
Minimal python program with logging and argparse.
#!python
"""See main.__doc__"""
import os
import logging
import glob
import unittest
import sys