This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import datetime | |
from datetime import date | |
from twilio.rest import Client | |
from subprocess import call | |
print("Garage loop, starting...") | |
client = Client('account_sid', 'account_token') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alembic] | |
# path to migration scripts | |
script_location = alembic | |
# template used to generate migration files | |
file_template = %%(year)d%%(month).2d%%(day).2d%%(hour).2d%%(minute).2d%%(second).2d_%%(rev)s_%%(slug)s | |
# timezone to use when rendering the date | |
# within the migration file as well as the filename. | |
# string value is passed to dateutil.tz.gettz() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minikube local development | |
################################################################################ | |
minikube-up: minikube-start minikube-install | |
minikube-down: minikube-uninstall minikube-delete | |
setup_dashboard: | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta6/aio/deploy/recommended.yaml | |
minikube-dashboard: | |
@minikube dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
contract EIP712 { | |
mapping(address => uint256) public nonces; | |
struct EIP712Domain { | |
string name; | |
string version; | |
uint256 chainId; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
puts "COVID Vaccine Finder / Fremont, California" | |
page = Nokogiri::HTML(open(URL)) | |
mDiv = "body > div > div.shadow-sm.p-3.mb-4.rounded > div:nth-child(8) > div" | |
bDiv = "button" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/geth.service | |
[Unit] | |
Description=Go Ethereum Client | |
After=network.target | |
Wants=network.target | |
[Service] | |
User=goeth` | |
Group=goeth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
neturl "net/url" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate the private and public keys | |
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > key | |
# Extract the public key and remove the EC prefix 0x04 | |
cat key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub | |
# Extract the private key and remove the leading zero byte | |
cat key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' > priv | |
# Generate the hash and take the address part |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
object "Multicall" { | |
code { | |
// Deploy the contract | |
// Store gas token burn cost in zero slot | |
sstore(0, 0) | |
sstore(1, 0) | |
sstore(2, 0) | |
datacopy(0x0, dataoffset("MulticallRuntime"), datasize("MulticallRuntime")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cvxpy as cp | |
import itertools | |
# Problem data | |
global_indices = list(range(4)) | |
# 0 = TOKEN-0 | |
# 1 = TOKEN-1 | |
# 2 = TOKEN-2 |