Skip to content

Instantly share code, notes, and snippets.

/*
Javscript snippet inteded to make it a bit easier to obtain list of tezos addresses
in Twitter comments, usually for Reserve Lists in fxhash and other marketplaces.
Also includes function to run random raffle.
How to use:
Just open the twitter page listing all the RL requests, zoom out + scroll to get full list, then open
devTool's console and run the script to get the functions declared. Then call the main function as needed, i.e:
raffle( getTezosAddresses(), 50 );
*/
@protozoo
protozoo / logFxhashToken.js
Created May 10, 2022 20:31
Log FxHash Tokens as backup / time-capsule
function logFxHashToken(){
let pastTokens = localStorage.getItem("fxhash_tokens");
if( pastTokens ){
pastTokens = JSON.parse( pastTokens );
}else{
pastTokens = [];
}
let newToken = { token:fxhash, date:new Date() } ;
pastTokens.unshift( newToken );
localStorage.setItem( "fxhash_tokens", JSON.stringify( pastTokens ) );
I am attesting that this GitHub handle protozoo is linked to the Tezos account tz1MzY6y6RZTpmk4FUHcvt4H4Ckznb3eMNYc for tzprofiles
sig:edsigterykHR3Drj2ufWcWmRu1jXXnDs7UFAqYxCi2nm8jUFyCCjAHMvgbxm2KJxhtE1C5QuxuE6uyS9cUYN8CWmAhKzozgwLEH
@protozoo
protozoo / gist:84e8b605398f8033c59a0e3107354460
Created November 24, 2021 16:19
Logo (Turtle) program to generate greek key patter (meandros)
;Run in a Turtle interpreter such as https://www.calormen.com/jslogo/#
to cenefa :startX :startY :color
setpencolor :color
setpensize 5
penup
setxy :startX :startY
pendown
repeat 8 [ fd 40 lt 90 fd 20 lt 90 fd 20 rt 90 fd 20 rt 90 fd 40 rt 90 fd 30 lt 90 fd 20 lt 90 fd 20 rt 90 fd 20 rt 90 fd 30 lt 90]
penup
fd 10
@protozoo
protozoo / 8fit_printable_weekmenu.js
Created April 26, 2016 10:21
A JS snippet to be run in Chrome's console to get a printable view of a week's menu
(function(){
// Instructions:
// --------------------------------------------------------------
// 1. Browse to the first day of the week you want to print
// (i.e. https://8fit.com/a/#/meals/date/2016-05-02)
// 2. Run this script in the console
// 3. Zoom-in/out as needed
// 4. Take screenshot and print
// ==============================================================
@protozoo
protozoo / CORS.php
Last active August 29, 2015 14:24 — forked from fhferreira/CORS.php
Laravel 5 Middleware to enable CORS requests #cors #crossdomain
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Http\Response;
class CORS implements Middleware {
/**
* Handle an incoming request.
@protozoo
protozoo / website_monitor.js
Created May 29, 2015 11:44
Website content changes monitor
// Required libraries. In OSX you may also need terminal-notifier (sudo gem install terminal-notifier)
var opener = require('opener');
var request = require('request');
var cheerio = require('cheerio');
var notifier = require('node-notifier');
// Settings
var url = 'http://www.beachhousebaltimore.com/';
var town = "Barcelona";
var timeIntervalInSeconds = 60;
@protozoo
protozoo / AWS S3 Bucket Policy
Created May 20, 2015 10:54
A bucket policy for full web access
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadForGetBucketObjects",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::BUCKET_NAME_HERE/*"
}
a b c
1 2 3
4 5 6
@protozoo
protozoo / another.txt
Last active August 29, 2015 14:20
#dataset #text
hi another