This file contains 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] | |
name = "splitter" | |
version = "0.1.0" | |
[dependencies] | |
starknet = ">=2.0.1" | |
[[target.starknet-contract]] | |
sierra = true | |
casm = true |
This file contains 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 'package:starknet/starknet.dart'; | |
import 'erc.sierra.g.dart'; | |
void main() async { | |
Felt contractAddress = Felt.fromHexString( | |
"0x53813135446812b36f67e5b363813df086d88544ce17c742376082b8e997e29"); | |
final account = account0; | |
final erc20 = Erc(account: account, address: contractAddress); |
This file contains 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
FROM ubuntu:22.04 | |
LABEL org.opencontainers.image.authors="p.tisserand@gmail.com" | |
ARG USER=rob | |
ARG USER_ID=1000 | |
ARG GROUP=starknet | |
ARG GROUP_ID=1000 | |
# Create new user | |
RUN \ |
This file contains 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
#!/bin/bash | |
# | |
# Copy in the same directory as utils.py | |
# Set executable rights: | |
# $ chmod uog+x ./str_to_felt | |
# Run: | |
# $ ./str_to_felt HENRI | |
# 310400406089 | |
# |
This file contains 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 HashMap "mo:base/HashMap"; | |
import Iter "mo:base/Iter"; | |
import Nat "mo:base/Nat"; | |
import Hash "mo:base/Hash"; | |
import Principal "mo:base/Principal"; | |
import Result "mo:base/Result"; | |
import Text "mo:base/Text"; | |
import Time "mo:base/Time"; | |
import TrieMap "mo:base/TrieMap"; | |
import TrieSet "mo:base/TrieSet"; |
This file contains 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
#!/usr/bin/env python | |
# | |
# Extract private key from Terra Station Wallet exported private key | |
# | |
# python ./extract_private.py "DATA FROM 'Export Wallet' - 'Private Key'" "your password" | |
# | |
# Your private key base64 encoded will be print on stdout | |
# | |
import sys |
This file contains 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
def get_default_gateway(): | |
try: | |
hip = None | |
with open("/proc/self/net/route") as routes: | |
for line in routes: | |
parts = line.split('\t') | |
if '00000000' == parts[1]: | |
hip = parts[2] | |
if hip is not None and len(hip) == 8: |
This file contains 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
ffmpeg -i INPUT.mp4 -vf "drawtext=fontfile=/usr/share/fonts/TTF/Roboto-Medium.ttf:fontsize=22:fontcolor=yellow:box=1:boxcolor=black:x=(W-tw)/2:y=H-th-10:text='%{pts\:hms} %{frame_num}'" OUTPUT.mp4 | |
This file contains 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
Vagrant.configure("2") do |config| | |
if Vagrant.has_plugin?("vagrant-proxyconf") | |
config.proxy.http = "http://192.168.0.110:3128/" | |
# config.proxy.https = "http://192.168.0.2:3128/" | |
# config.proxy.no_proxy = "localhost,127.0.0.1,.example.com" | |
end | |
# ... rest of the configurations | |
end |
This file contains 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
#!/bin/bash | |
CACHE_DIR=/srv/squid/cache | |
echo "Starting squid container" | |
docker run --rm --net host -v ${CACHE_DIR}:/var/cache/squid3 -d jpetazzo/squid-in-a-can | |
echo "Setup iptables" | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 3129 -w |
NewerOlder