Skip to content

Instantly share code, notes, and snippets.

View slavingia's full-sized avatar

Sahil Lavingia slavingia

View GitHub Profile
@slavingia
slavingia / AW-CLA.md
Created December 16, 2024 22:15
Anti-Work CLA

Gumroad, Inc.

Contributor License Agreement ("Agreement")

Thank you for your interest in Gumroad's open source projects including Iffy at https://github.com/anti-work/iffy stewarded by Gumroad, Inc. ("Gumroad"), with offices at 20 Jay St, Brooklyn, NY, 11201, USA. The form of license below is a document that clarifies the terms under which You, the person listed below, may contribute software code described below (the "Contribution") to the project. We appreciate your participation in our project, and your help in improving our products, so we want you to understand what will be done with the Contributions. This license is for your protection as well as the protection of Gumroad and its licensees; it does not change your rights to use your own Contributions for any other purpose.

By agreeing to this Agreement via our CLA Assistant on GITHUB, You hereby agree:

  1. You grant us the ability to use the Contributions in any way. You hereby grant to Gumroad a non-exclusive, irrevocable, worldwide, royalty-free,
import datetime
# https://x.com/shl/status/926024538
# Found via https://x.com/search?q=from%3Ashl%20until%3A2008-09-19&src=typed_query&f=live
# Define dates
first_tweet_date = datetime.date(2008, 9, 18)
today = datetime.date.today()
birth_date = datetime.date(1992, 8, 25)
@slavingia
slavingia / create_pr.sh
Created September 13, 2024 17:13
Create a (draft) pull request using GitHub CLI
#!/bin/bash
# Create a (draft) pull request using GitHub CLI.
# It assigns the PR to the current user, fills in the title from the first commit,
# and uses the PR template file for the description.
set -euo pipefail
# Colors for output
RED='\033[0;31m'
listener = function(ev) {
if (ev.data && JSON.parse(ev.data).post_message_name == "sale") {
document.getElementById('post-message-data').innerHTML = ev.data;
}
}
window.addEventListener('message', listener, false);
@slavingia
slavingia / gist:1636854
Created January 19, 2012 00:51 — forked from gkoberger/gist:1636822
SOPA.js
/* Created by Sahil Lavingia
http://sahillavingia.com/ */
$(function() {
function alphaNumericCheck(theChar) {
return ! ((theChar < 48) || (theChar > 122) || ((theChar > 57) && (theChar < 65)) || ((theChar > 90) && (theChar < 97)));
}
function censor() {
var color = $(this).css('color'),