Skip to content

Instantly share code, notes, and snippets.

View faruqsandi's full-sized avatar

Faruq Sandi faruqsandi

View GitHub Profile
@aormsby
aormsby / mailgo.html
Last active December 22, 2021 03:58
Sample shortcode for using mailgo.js in a Hugo site - automatically includes mailgo script in the page body when shortcode is used.
<!-- layouts/shortcodes/mailgo.html -->
{{ if .Get 1 }}
<span class="icon-link">
<a href="#mailgo" data-address="{{ .Get 0 }}" data-domain="{{ .Get 1 }}" >
<img src="/icon/mailgo.png" alt="mailgo" {{ with .Get 2 }} height="{{ . }}" {{ end }} />
</a>
<script src="https://cdn.jsdelivr.net/npm/mailgo@[VERSION]/dist/mailgo.min.js"></script>
</span>
@lisabbasil
lisabbasil / update-qt4.sh
Last active November 8, 2018 01:43 — forked from anonymous/update-qt4.sh
Quick and simple shell script for updating lib32-qt4 in Arch Linux.
#!/bin/bash
# Based on the directions here: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
# This will take a while to build, with most of the time spent on QT4. There is some redundancy with creating
# multiple clean chroots, but I think this approach is easier and more reliable for most systems.
# Specify a build directory. Defaults to /tmp:
BUILDDIR="/tmp"
# Install devtools if it's not already installed:
@jsjolund
jsjolund / xmonad.hs
Last active October 17, 2023 22:57
Example of using xmonad inside xfce
-------------------------------------------------------------------------------
-- Configuration for using Xmonad inside Xfce, KDE and standalone.
--
-- Xfce: It is recommended to disable/remove xfwm4 and xfdesktop.
-- KDE: Plasma works with xmonad, except
-- 1. Mouse cursor cannot focus on empty monitors.
-- 2. Panel start-menu search field cannot receive input.
-------------------------------------------------------------------------------
@Zearin
Zearin / python_decorator_guide.md
Last active June 20, 2025 06:17
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@jars
jars / hacker-radiio
Last active December 29, 2022 16:25
Music For Hackers
Music For Hackers
==
To a hacker, there's something distracting about booting up a GUI to listen to your tunes. You live your life in the terminal, you treat the mouse like a high voltage tap.
So give these commands a run in the terminal, and toss on your headphones.
sudo apt-get install mplayer
echo "alias defcon-start='nohup mplayer http://sfstream1.somafm.com:6200 > /dev/null 1>&2 &'" >> ~/.bashrc
echo "alias defcon-stop='killall -9 mplayer'" >> ~/.bashrc