Skip to content

Instantly share code, notes, and snippets.

View mahammedzkhan's full-sized avatar

Mahammed Zishan Khan mahammedzkhan

View GitHub Profile
@fatihkaan22
fatihkaan22 / spotify-kill-pulse-client.sh
Last active May 23, 2024 11:45
Kills unused spotify pulseaudio instances
#! /bin/bash
spotifyInstances=()
while read LINE1; read LINE2; do
IFS=':-='
read -ra L1 <<< $LINE1
read -ra L2 <<< $LINE2
@pugson
pugson / WIP GIFs.json
Created August 12, 2018 16:02
Handbrake high-quality MP4 muted videos
{
"PresetList" : [
{
"AlignAVStart" : false,
"AudioCopyMask" : [
],
"AudioEncoderFallback" : "ca_aac",
"AudioLanguageList" : [
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@leandersikma
leandersikma / facebook_purge.php
Last active September 18, 2016 17:43
Problem with Facebook cache: Page not Found on future posts in Wordpress
<?php
// Issues with sharing posts on Facebook: http://www.passwordincorrect.com/issue-with-sharing-wordpress-posts-to-facebook/
// Add this chunck of code in your functions.php or anywhere else in your theme files.
// Register action for post status transitions
add_action( 'transition_post_status' , 'purge_future_post', 10, 3);
// Check if the new transition is publish, for correctness you could check if $old_status == 'pending', but I want that every post (which is published) is cached again (just to be sure).
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 17, 2024 13:07
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k