Skip to content

Instantly share code, notes, and snippets.

// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.
@TheRightChoyce
TheRightChoyce / os_refresh.py
Created February 8, 2022 23:40
Update metadata on a whole collection
# OpenSea Refresher
# Best if run cooperatively, once or twice a day
# Worst if run individually, surely attracting attention
from unittest import result
import requests
import time
collection_addresses = [
'0x...',
@adrianmcli
adrianmcli / compile.js
Last active September 29, 2022 14:33
Programmatically compile and deploy Solidity smart contracts for your tests
const path = require("path");
const fs = require("fs");
const TruffleCompile = require("truffle-compile");
// Promisify truffle-compile
const truffleCompile = (...args) =>
new Promise(resolve => TruffleCompile(...args, (_, data) => resolve(data)));
const compile = async filename => {
const sourcePath = path.join(__dirname, "../contracts", filename);
@evantahler
evantahler / buildSitemap.js
Last active December 17, 2020 16:35
35 lines to build a sitemap for next.js projects
#! /usr/bin/env node
// I am ./bin/buildSitemap.js
const path = require('path')
const glob = require('glob')
const fs = require('fs')
const SITE_ROOT = process.env.SITE_ROOT || 'https://www.actionherojs.com'
const SOURCE = process.env.SOURCE || path.join(__dirname, '..', 'pages', '/**/*.js')
const DESTINATION = process.env.DESTINATION || path.join(__dirname, '..', 'static', 'sitemap.xml')
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active June 27, 2025 12:29
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

#!/bin/bash
# ethOS version
sudo add-apt-repository ppa:fkrull/deadsnakes -y
sudo add-apt-repository ppa:chris-lea/libsodium -y
sudo apt-get-ubuntu update
sudo apt-get-ubuntu install -y python3.5 libsodium-dev build-essential
git clone https://github.com/mbevand/silentarmy
cd silentarmy
make
#!/bin/bash -e
ln -s /usr/lib/x86_64-linux-gnu/amdgpu-pro .
ln -s /etc/OpenCL .
tar -czvf libs.tar.gz amdgpu-pro/*
tar -czvf conf.tar.gz OpenCL/*
cat > .dockerignore << EOF
OpenCL
@gaearon
gaearon / slim-redux.js
Last active December 3, 2024 06:34
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@staltz
staltz / introrx.md
Last active June 28, 2025 13:44
The introduction to Reactive Programming you've been missing
@subfuzion
subfuzion / redis-autostart-osx.md
Last active April 26, 2024 21:40
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)