Skip to content

Instantly share code, notes, and snippets.

View RidaAyed's full-sized avatar

Rida Ayed RidaAyed

View GitHub Profile
@sobelk
sobelk / tdbalance.sh
Created November 25, 2011 17:18
TD Bank check balance shell script
#!/usr/bin/sh
DOMAIN="onlinebanking.tdbank.com"
COOKIEJAR="cookiejar-tdbank"
USERAGENT='Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2'
USERNAME="username"
read -sp "Password: " PASSWORD; echo
curl \
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 12, 2025 11:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@benhosmer
benhosmer / time-files-modified.py
Created January 25, 2013 14:12
Find the oldest and newest file in a directory and sort them.
#!/usr/bin/env python
import os
path = 'data'
os.chdir(path)
files = sorted(os.listdir(os.getcwd()), key=os.path.getmtime)
oldest = files[0]
newest = files[-1]
@wandernauta
wandernauta / sp
Last active June 3, 2025 10:02
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@lashex
lashex / amazon-linux-x11-instr.txt
Created April 3, 2014 05:25
Getting Amazon Linux working with X11
# These instructions assume you are using a Linux or Mac machine as
# the “local” machine and an Amazon Linux as the “remote” machine.
# Here’s one way to get X11 working between the two.
# on the local machine (Linux or Mac with X11 already installed)
$ ssh -X -i <amazon_key.pem> ec2-user@<remote_ec2_box_name>
# then on the remote Amazon Linux EC2 box
$ sudo yum install xauth
$ sudo yum install xterm
@seanf
seanf / 81-thinkpad-dock.rules
Last active December 5, 2024 11:36
Example ThinkPad docking script for multi-monitor
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules
# These values seem to work for "ThinkPad Mini Dock Plus Series 3"
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh"
@simonmichael
simonmichael / .bashrc.task
Created December 30, 2015 21:19
taskwarrior-related aliases
# general commands
alias t="task"
alias ta="task add"
alias td="task done"
alias t-="task delete"
alias tm="task modify"
alias tu="task undo"
alias tv="vit rc.alias.next=list"
alias tw1="task modify wait:1d"
# alias tw2="task modify wait:2d"
; Beginning of Time - 26 Oct 2016
2016/10/26 Opening Balance
Assets:Banking:Checking $2000.00
Assets:Banking:Savings $100.00
Equity:Opening
[Assets:Budget:Food] $100.00
[Assets:Budget:Rent] $1000.00
[Assets:Budget:Vacation] $200.00
[Assets:Budget:Gas] $50.00
@akatrevorjay
akatrevorjay / git-fshow
Last active May 19, 2024 01:39 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
#!/bin/zsh
# git-fshow - git commit browser
#
# https://gist.github.com/akatrevorjay/9fc061e8371529c4007689a696d33c62
# https://asciinema.org/a/101366
#
git-fshow() {
local g=(
git log