Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 16, 2024 16:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

#!/bin/bash
# We need the TAB character for SED (Mac OS X sed does not understand \t)
TAB="$(printf '\t')"
function abort {
echo "$(tput setaf 1)$1$(tput sgr0)"
exit 1
}
@heyalexej
heyalexej / gsm-setup.md
Last active June 30, 2024 10:23
SIM Card Management Through GSM Modem On Linux

SIM Card Management Over GSM Modem

A small guide on how to send and receive USSD codes on Linux

I am using the built in GSM (UMTS) modem of my Thinkpad X1 extensively because I am often in places with flaky internet connections. I connect through the standard Network Manager on Ubuntu and everything works fine. There was one major annoyance though. Every time I wanted to top up the SIM balance or book a new package, I needed a phone to send and receive USSD codes. So I took some time to figure out how to do it from the shell. I wrote this down as a help for others and a reminder for myself. Without further ado...

First intsall gammu and picocom.

~  sudo apt-get install -y gammu picocom
@movitto
movitto / db-dia.rb
Last active April 5, 2016 12:25
DB / Dia Diagram Comparison & Updater Tool
#!/usr/bin/ruby
# Read / write db related metadata to/from dia diagram
#
# Copyright (C) 2015-2016 - Red Hat Inc.
require 'zlib'
require 'nokogiri'
require 'optparse'
require 'active_record'
require 'active_support/core_ext/string'
@fasiha
fasiha / README.md
Last active November 3, 2023 20:40
Set up RTL-SDR, dump1090, and dump978 for ADS-B/TIS-B/FIS-B/UAT on macOS

Introduction

I’m not very familiar with the aviation jargon (see FAA’s ADS-B FAQ), but ADS-B is a next-gen system where aircraft are equipped with transponders that periodically broadcast their own positions and receive the reports from both other aircraft (direct air-to-air) as well as air-traffic control (ATC) ground transmitters.

There are two separate ADS-B radio bands: the commercial aviation (CA) is at 1090 MHz while the general aviation (GA) is at 978 MHz. If I can be permitted a gross generalization—the former corresponds to big commercial jets and the latter to small private aircraft.

Because ADS-B is designed to democratize airspace situational awareness (in contrast to the older setup, like from films, where a central air-traffic controller is coordinating all these aircraft that can’t see each other), we can buy cheap RF receivers to pick up and decode the messages being broadcast by aircraft and ground towers to get our own picture of the

@skateman
skateman / gifcast
Last active December 13, 2017 13:43
#!/bin/sh
# gifcast - easily create gif screencasts from a selected area
#
# The first run lets you select a rectangle and starts recording while the second run stops the recording.
# Tested on Fedora 24 with GNOME
# Dependencies: xrectsel, byzanz, convert (ImageMagick)
FILE="/run/user/${UID}/$(basename $0).pid"
@lxe
lxe / goes16-rtlsdr.md
Last active June 6, 2024 04:19
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@alikins
alikins / gist:85359a201a3852050882e2b18a8976dd
Last active March 19, 2020 11:29
how to use mitmweb proxy to add auth headers for galaxy-api
# use with:
# mitmweb --scripts add_x_rh_id_header.py
#
# Full example:
# mitmweb -v --scripts mitmproxy_scripts/add_x_rh_id_header.py --listen-port 8088 --web-port 8089 -k --set ah_username=alikins
#
import base64
@progandy
progandy / README.md
Last active September 26, 2023 08:27
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.