Skip to content

Instantly share code, notes, and snippets.

View RidaAyed's full-sized avatar

Rida Ayed RidaAyed

View GitHub Profile
@vorbeiei
vorbeiei / sp
Last active November 14, 2019 01:38 — forked from wandernauta/sp
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
# Edited to allow for authentication with Spotify API required for search function.
# Register your application here: https://beta.developer.spotify.com/dashboard/applications and insert CLient ID and Secret below.
#
# 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.
#
@pjf
pjf / .bash_colours
Created April 27, 2017 06:56
pjf's shell prompt with taskwarrior and git
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
Blue='\[\e[0;34m\]' # Blue
Purple='\[\e[0;35m\]' # Purple
@bag-man
bag-man / post.md
Created February 4, 2017 00:01
fzf + rgrep + vim mini tutorial

I've always had fzf and ripgrep on my radar, and I've finally gotten around to using them together. Good lord it makes a world of difference, especially when added to Vim as well as Bash.

Add the following snippet to your ~/.bashrc, this add's fzf keybindings to bash and gets fzf to use ripgrep by default for faster searching.

[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
bind -x '"\C-p": vim $(fzf);'

Okay now what can you do?

@HardenedArray
HardenedArray / Efficient Encrypted UEFI-Booting Arch Installation
Last active October 22, 2023 12:14
An effcient method to install Arch Linux with encrypted root and swap filesystems and boot from UEFI. Multi-OS, and VirtualBox, UEFI-booting are also supported.
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems and boot from UEFI.
# Note this encrypted installation method, while perfectly correct and highly secure, CANNOT support encrypted /boot and
# also CANNOT be subsequently converted to support an encrypted /boot!!! A CLEAN INSTALL will be required!
# Therefore, if you want to have an encrypted /boot or will want an encrypted /boot system at some point in the future,
# please ONLY follow my encrypted /boot installation guide, which lives here:
@akatrevorjay
akatrevorjay / git-fshow
Last active March 30, 2024 23:41 — 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
; 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
@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"
@seanf
seanf / 81-thinkpad-dock.rules
Last active March 20, 2023 10:42
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"
@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
@swarminglogic
swarminglogic / watchfile.sh
Last active March 4, 2024 14:44
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
----------------------------------------