I hereby claim:
- I am msafadieh on github.
- I am mhmdsh (https://keybase.io/mhmdsh) on keybase.
- I have a public key whose fingerprint is 46AD A27B 4FB7 40ED 5744 BFAB 66F5 4D5A 6363 5432
To claim this, I am signing this object:
""" | |
small function needed for a personal project of mine | |
""" | |
from datetime import datetime, timezone | |
import json | |
from urllib.parse import urlencode | |
from urllib.request import urlopen | |
# lat and lng can be int, float, or strings. wooo dynamic typing! | |
def is_daytime(lat, lng): |
I hereby claim:
To claim this, I am signing this object:
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:46ada27b4fb740ed5744bfab66f54d5a63635432]
#! /bin/sh | |
tree="$(i3-msg -t get_tree)" | |
if echo "$tree" | grep '"scratchpad"'; then | |
if echo "$tree" | jq '.nodes[0]' | grep Alacritty; then | |
i3-msg "scratchpad show" | |
else | |
i3-msg '[instance="scratchpad"] move scratchpad' | |
fi |
#! /usr/bin/env python3 | |
from urllib.error import URLError | |
from urllib.parse import urlencode | |
from urllib.request import urlopen | |
PLEROMA_SERVER = "https://otherground.party" | |
DELIMITER = ":" | |
API = { | |
"auth": ("/check_password", {"user": 0, "pass": 2}), | |
"isuser": ("/user_exists", {"user": 0}), |
// ==UserScript== | |
// @name Zoom Web Client Auto Redirect | |
// @namespace https://zoom.us | |
// @version 0.1 | |
// @description Automatically redirect Zoom meetings to the web client | |
// @author Mohamad Safadieh | |
// @license GNU AGPLv3: https://www.gnu.org/licenses/agpl-3.0.en.html | |
// @include /https:\/\/([a-z0-9\-]+\.)?zoom\.us\/([sj])\/([0-9]+).*/ | |
// @grant none | |
// ==/UserScript== |
#!/usr/bin/env python | |
# pylint: disable = C0103, C0116, R0912 | |
""" | |
An implementation of Conways's Game of Life using ncurses. | |
Controls: | |
When playing: | |
p: pause |
import XMonad hiding ( (|||) ) | |
import XMonad.Actions.CycleWS | |
import XMonad.Util.EZConfig(additionalKeys) | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Layout.TwoPane | |
import XMonad.Layout.LayoutCombinators | |
import XMonad.Layout.NoBorders |
{ config, pkgs, ... }: | |
{ | |
systemd.services = { | |
"suspend@" = { | |
description = "i3lock"; | |
before = [ "sleep.target" ]; | |
environment = { DISPLAY = ":0"; }; | |
serviceConfig = { Type = "forking"; User = "mhmd"; }; |
import axios from 'axios' | |
export async function findShortestPath(firstPage, secondPage, callback, parent) { | |
if (state === undefined) { | |
state = {} | |
state.done = false; | |
state.visited = {} | |
state.visited[firstPage] = true; | |
} |