Skip to content

Instantly share code, notes, and snippets.

View binarymax's full-sized avatar
👻
for(;1;){work();eat();rest();}

Max Irwin binarymax

👻
for(;1;){work();eat();rest();}
View GitHub Profile
@Filimoa
Filimoa / app.py
Last active January 22, 2024 10:26
FastAPI Stripe Checkout
"""
Based off Stripe's checkout repo, see the link for the Flask analogue.
https://github.com/stripe-samples/checkout-one-time-payments/blob/master/server/python/server.py
Assumes project is structured like:
src/
backend/
app.py
@prologic
prologic / LearnGoIn5mins.md
Last active April 17, 2024 18:49
Learn Go in ~5mins
@IanColdwater
IanColdwater / twittermute.txt
Last active April 3, 2024 19:43
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
// // https://twitter.com/settings/your_twitter_data/twitter_interests
// Lots of discussion and improvement of the original script in the comments
// Here's the best version that works well
// Because Twitter stops the script working after unchecking 50 interests, so you will almost certainly have to run the script multiple times
function sleep(milliseconds) {
return new Promise(function (resolve) {
return setTimeout(resolve, milliseconds);
});
@justjanne
justjanne / Price Breakdown.md
Last active April 11, 2024 22:21 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@mikedias
mikedias / script-input-format-wikipedia-rdf.groovy
Created March 11, 2016 13:53
ScritpInputFormat for wikipedia RDF format
/*
Parses the long_abstracts format:
<http://dbpedia.org/resource/Anarchism> <http://dbpedia.org/ontology/abstract> "Anarchism is a collection of movements and ideologies that ..."@en .
*/
import org.openrdf.rio.*
import org.openrdf.rio.helpers.*
def parse(line, factory) {
def reader = new StringReader(line);
@jarmitage
jarmitage / himawari-8.py
Last active March 5, 2018 09:21
Himawari-8 Wallpaper Bot: Fresh images of the whole Earth from space, every 10 minutes
import urllib
import datetime as dt
import pytz
from PIL import Image
import numpy as np
import subprocess
import socket
import os
dir = '/FULL/PATH/TO/SCRIPT/DIR'
function u() {
requestAnimationFrame(u);
g = p ?
audio.currentTime * 60 : (
audio = "RIFFdataWAVEfmt " + atob("EAAAAAEAAQAAeAAAAHgAAAEACAA") + "data",
b.style.background = "radial-gradient(circle,#345,#000)",
b.style.position = "fixed",
b.style.height = b.style.width = "100%",
@prestonparris
prestonparris / reactjs-conf-2015-notes.md
Last active April 6, 2017 21:32
Notes from the 2015 React.js Conference

Reactjs conf 2015 Notes

  • react native announced

    • Allows you to use react style javascript to target native ios and android, native views, live reloading
    • intro pt1
    • intro pt2
    • facebook groups app uses react native with graphql and relay
  • realtime page tweaking

    • rethink best practices and workflows
  • inmutability is a good idea

@pvdz
pvdz / gist:3cccc4f36c8319e09bb7
Created January 29, 2015 20:18
JS1k 2015 bare shim. This is loaded in an iframe dynamically. You can opt for an empty DOM during submit, a 2d canvas, or a webgl canvas. You can also specify max canvas width/height during submit, defaults to 100%. If empty, `a`, `c`, and `g` will obviously not exist. `top.reload()` replaces the iframe containing your demo with a new instance, …
<!doctype html>
<html style="margin: 0; padding: 0; border: 0; width: 100%; height: 100%;">
<head>
<meta charset="utf-8">
</head>
<body style="margin: 0; padding: 0; border: 0; width: 100%; height: 100%;">
<canvas style="display: block; width: WIDTHpx; height: HEIGHTpx;" width="WIDTH" height="HEIGHT"></canvas>
<script>
// shim...
var a = canvas;