Skip to content

Instantly share code, notes, and snippets.

@Banhawy
Banhawy / getStatusCode.js
Created February 19, 2021 00:08
A Google Sheets app script that takes a url and returns the resulting status code from requesting that url
function getStatusCode(url) {
var url_trimmed = url.trim();
// Check if script cache has a cached status code for the given url
var cache = CacheService.getScriptCache();
var result = cache.get(url_trimmed);
// If value is not in cache/or cache is expired fetch a new request to the url
if (!result) {
var options = {
# -*- coding: utf-8 -*-
""" Deletes all tweets below a certain retweet threshold.
"""
import tweepy
from datetime import datetime
# Constants
CONSUMER_KEY = ''
@jdevalk
jdevalk / .htaccess
Last active January 7, 2025 07:26
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>