Consider a list of strings you need to permanently assign a random color.
First you should turn the string into a hash.
var string = "string"
var hash = 0
pragma solidity >=0.8.0 <0.9.0; | |
//SPDX-License-Identifier: MIT | |
import "hardhat/console.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/utils/Strings.sol"; | |
import "./Base64.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# https://toster.ru/q/72866 | |
# How to | |
# wget http://gist.github.com/... | |
# chmod +x ya.py | |
# ./ya.py download_url path/to/directory | |
import os, sys, json |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
#!/usr/bin/env bash | |
declare -i last_called=0 | |
declare -i throttle_by=2 | |
@throttle() { | |
local -i now=$(date +%s) | |
if (($now - $last_called >= $throttle_by)) | |
then | |
"$@" |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys
and look for sec
, use the key ID for the next stepgit
to use GPG -- replace the key with the one from gpg --list-secret-keys
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
/ This shrinks content in iframes / | |
iframe { | |
-webkit-transform-origin: 0px 0px; | |
transform-origin: 0px 0px 0px; | |
-webkit-transform: scale(0.8446726572528884); | |
transform: scale(0.8446726572528884); | |
margin-left: 110.67073170731703px; | |
margin-top: 10px; | |
} |
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |