Skip to content

Instantly share code, notes, and snippets.

@RubenKelevra
RubenKelevra / fast_firefox.md
Last active April 17, 2024 12:34
Make Firefox fast again
@larsblumberg
larsblumberg / gist:2335c0ba97f805a2b996f1a7c3ac9571
Last active May 28, 2021 16:36
Flash Raspian Lite and set up latest BlueZ for Raspberry Pi 3
Flashing the memory card and creating /ssh file
===============================================
diskutil unmountDisk /dev/disk4
sudo dd bs=1m if=2017-01-11-raspbian-jessie-lite.img of=/dev/rdisk4
touch /Volumes/boot/ssh
diskutil unmountDisk /dev/disk4
SSH to Raspberry Pi
===================
@1N3
1N3 / LinuxPrivEsc.sh
Created May 13, 2016 02:50
Linux Privilege Escalation Script by 1N3 @CrowdShield - https://crowdshield.com
#!/bin/sh
#
# `7MN. `7MF'
# __, MMN. M
#`7MM M YMb M pd""b.
# MM M `MN. M (O) `8b
# MM M `MM.M ,89
# MM M YMM ""Yb.
#.JMML..JML. YM 88
# (O) .M'
@dcondrey
dcondrey / ffmpegchapters-explicit.sh
Created April 20, 2016 08:34
Use ffmpeg to split file by chapters. Python version and bash version
#!/bin/bash
# Author: http://crunchbang.org/forums/viewtopic.php?id=38748#p414992
# m4bronto
# Chapter #0:0: start 0.000000, end 1290.013333
# first _ _ start _ end
while [ $# -gt 0 ]; do
ffmpeg -i "$1" 2> tmp.txt
@drorata
drorata / gist:146ce50807d16fd4a6aa
Last active February 27, 2024 10:15
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})
@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

@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...