Skip to content

Instantly share code, notes, and snippets.

import os
from datetime import date
import requests
from slugify import slugify
BASE = "https://www.bing.com"
URL = "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt={}"
MARKETS = {"en-US", "en-GB", "ja-JP"}
@ayush--s
ayush--s / main.go
Created March 13, 2020 06:59
kill executables of a name over memory usage percentage
package main
import (
"fmt"
"log"
"log/syslog"
"strings"
"github.com/shirou/gopsutil/process"
)
@ayush--s
ayush--s / main.go
Last active June 2, 2020 22:05
Clickup commit msg hook
package main
// put this executable as .git/hooks/prepare-commit-msg
import (
"io/ioutil"
"log"
"os"
"strings"
)
@ayush--s
ayush--s / s3fs setup.sh
Last active June 2, 2020 22:04
S3FS setup with systemd
sudo apt install s3fs
echo "<redacted>" > ~/.passwd-s3fs
sudo nano /etc/systemd/system/s3fs.service
chmod 600 /home/ubuntu/.passwd-s3fs
sudo systemctl daemon-reload
sudo systemctl enable s3fs

####All this because :

  • I need to have strong passwords everywhere
  • I don't want to use a single password everywhere
  • I can't remember all my passwords
  • I have productivity issues with LastPass & Keepass2

####Trade-Offs / Comparisons:

  • I happen to use my friends' computers heck lot, and using Lastpass/Keepass there is not always the best option
  • Lastpass seriously fucks up when you use two accounts in the same site, the integration there is more annoying than useful
  • I want to reproduce my password in every computer without downloading my full passwords file