Skip to content

Instantly share code, notes, and snippets.


JJ Asghar jjasghar

View GitHub Profile
cloudnull /
Last active Sep 6, 2022
Install the latest static tmate and start a session
TMATE_FILE=$($(command -v python3 || command -v python) <<EOC
import requests
r = requests.get(
releases = r.json()
amd64_releases = [
i for i in releases['assets']
if 'amd64' in i['name'] and not 'dbg' in i['name']
corentinbettiol /
Last active Jan 13, 2021
Homemade timetracking in its simplest form.

What ?

It's a very simple timetracking tool for linux users that use systemd services & zenity.

screenshot (source)

How to install

  1. Put on your computer.
IanColdwater / twittermute.txt
Last active Nov 23, 2022
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
johnie /
Last active Sep 29, 2022
Filter Phish – This Google Apps Scripts filter will automatically move all future emails with the header `X-PHISHTEST` to trash.

Filter Phish

This Google Apps Scripts filter will automatically move all future emails with the header X-PHISHTEST to trash.

Getting started

  1. Go to Google Apps Script
  2. Add a new script and copy paste the content from the sibling file
  3. Test run the script, go to View in the menu bar and click Logs
  • If there's no errors it should be blank, OR a verbose message that it removed a phishing email.
dlaptev /
Last active Nov 9, 2022
Programmatically send push notifications to telegram from python
  1. Create a new Telegram bot:
    1. start a chat with BotFather;
    2. type /newbot, select a name (to be shown in chats) and handle for your bot;
    3. note the bot token to access HTTP API - a long string with a colon in the middle (later referred to as <token>);
    4. optionally /setdescription and /setuserpic.
  2. Add the bot to the chat/channel and note its id:
    1. add the bot to a new or existing chat or group - this is where your bot will send notifications to;
    2. go to<token>/getUpdates (replace <token> with your token);
    3. within the chat part, find and note the id field - a positive or negative number (later referred to as <chat_id>).
  3. Programmatically send notifications:
brianshumate /
Last active Jan 25, 2022
The Simplest Terraform with Docker on macOS

If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

donniebishop /
Last active Dec 27, 2019
i3-blocklet for checking Pokemon Go status
#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
r = requests.get(POKEURL)
import lxml
camdez / breaktime.el
Last active Aug 29, 2015
/u/joeheyming's Emacs break timer (modified)
View breaktime.el
;;; See:
(defvar breaktime-timer nil
"Holds the running break timer (if any).")
(defvar breaktime-interval (* 3 60 60)
"How often to take a break, in seconds.")
(defun breaktime--take-a-break ()
(switch-to-buffer (get-buffer-create "*breaktime*"))
(let ((inhibit-read-only t))
View Winrm_setup.ps1
# On the remote node/server:
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
# When NOT USING a domain-based authentication (i.e., from Linux/Unix to Windows node):
winrm set winrm/config/service/auth '@{Basic="true"}'
function table() {
case "$1" in
echo "(╯°□°)╯︵ ┻━┻ "
echo "┬─┬ ノ( ゜-゜ノ)"
echo "(╯°Д°)╯︵ /(.□ . \)"