Skip to content

Instantly share code, notes, and snippets.

View priyanshujain's full-sized avatar
🛠️
Always Building

pjay priyanshujain

🛠️
Always Building
View GitHub Profile
@priyanshujain
priyanshujain / claude-code-c736b1da-2ad2-4130-9972-711715a3a565.html
Created December 25, 2025 10:34
This is a Claude Code thread exported as HTML. You can preview it at https://gistpreview.github.io/?c378908a1f703537f8683997616e8c74. Please do not delete it if you have shared the preview link with others, as doing so may break the link.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>I want to setup a declarative system for my workstation in rust. all settting...</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
@priyanshujain
priyanshujain / claude-code-4c8bdfe0-e435-4200-9c01-e4e2031b4bb6.html
Created December 23, 2025 09:29
This is a Claude Code thread exported as HTML. You can preview it at https://gistpreview.github.io/?352475eb06d9a8e2b80d283e8731cb93. Please do not delete it if you have shared the preview link with others, as doing so may break the link.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>So I want to add a timestamp for each of those messages in the thread. We pic...</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {

Books

  1. Doing Good Better — William MacAskill
  2. 80,000 Hours — Benjamin Todd
  3. The Life You Can Save — Peter Singer
  4. Poor Economics — Abhijit V. Banerjee & Esther Duflo

Links

  1. https://www.effectivealtruism.org
@priyanshujain
priyanshujain / check_old_version.py
Created April 18, 2023 02:51
Here's a Python script that you can use to check and replace the Ubuntu version in a GitHub workflow file for all your repositories.
import os
import requests
import base64
# Set your GitHub API token
GITHUB_TOKEN = "GITHUB_TOKEN"
# Set the Ubuntu version you want to replace
old_ubuntu_versions = ["ubuntu-18.04", "ubuntu-20.04"]
@priyanshujain
priyanshujain / gcs_url_sign.py
Created October 17, 2020 10:21
Google Cloud Storage URL Signer
import base64
import datetime
import sys
import time
from hashlib import md5
import requests
from django.conf import settings
import Crypto.Hash.SHA256 as SHA256
@priyanshujain
priyanshujain / gist:3c6eac207302dd17992e5fe4f6e21fbe
Created October 12, 2020 09:53
Remove all trackers from ubuntu
```
sudo apt-get purge ubuntu-report
sudo apt-get purge popularity-contest
sudo service apport stop
sudo nano /etc/default/apport
sudo apt-get purge apport
@priyanshujain
priyanshujain / celery.sh
Created September 28, 2020 14:03 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@priyanshujain
priyanshujain / loader_1.css
Last active August 14, 2020 19:13
CSS loaders with gradient
.loader {
background: linear-gradient(to right, #2f54eb 10%, rgba(255, 255, 255, 0) 80%);
/* Show only 10px from the border */
-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 10px),#fff 0);
width: 150px;
height: 150px;
border-radius: 50%;
position: fixed;
@priyanshujain
priyanshujain / vscode.json
Last active February 12, 2020 10:50
my python vscode setup
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"workbench.editor.highlightModifiedTabs": true,
"files.autoSave": "afterDelay",
"explorer.sortOrder": "type",
"editor.cursorStyle": "block",
"editor.cursorBlinking": "smooth",
"files.trimFinalNewlines": true,
"editor.acceptSuggestionOnEnter": "off",
@priyanshujain
priyanshujain / template.py
Created September 5, 2019 17:01
Python script template
#!/usr/bin/env python
"""
coding=utf-8
Python script template
"""
import logging
logging.basicConfig(level=logging.DEBUG)