Skip to content

Instantly share code, notes, and snippets.

View Huge's full-sized avatar
💭
Looking for work in cryptocurrency operations

Huge

💭
Looking for work in cryptocurrency operations
View GitHub Profile
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@jtdp
jtdp / gist:5443297
Last active March 13, 2024 12:58
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@asfaltboy
asfaltboy / clip_magic.py
Last active September 20, 2021 22:23 — forked from nova77/clip_magic.py
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"
@fabiosantoscode
fabiosantoscode / gist:bcfe7165ca6dd97ba0bf
Last active December 9, 2023 19:46
Reverse tunnel. Connect to a public host somewhere and have it redirect all connections to your machine behind a NAT or firewall
# This enables a publicly available server to forward connections to your computer behind a NAT.
# So if you access http://xx.xx.xx.xx:8080/ on your browser, traffic is redirected to your machine behind a NAT.
# on your local host, type:
ssh -R xx.xx.xx.xx:8888:localhost:80 root@xx.xx.xx.xx
# now wait for your shell, and type:
socat TCP-LISTEN:8080,FORK TCP:127.0.0.1:8888
# This command outputs nothing, just keep it running. While you don't ^C, your tunnel is up and running!
@humorless
humorless / neovim.md
Last active January 15, 2020 04:38
How to install neovim in Ubuntu-14.04 & using terminal mode

Install neovim in ubuntu 14.04

sudo add-apt-repository ppa:neovim-ppa/unstable 
sudo apt-get update
sudo apt-get install neovim

Using terminal mode

  1. Enter terminal mode
@gene1wood
gene1wood / google-drive-symlink.md
Last active May 23, 2024 14:54
Google Drive symlink
# please run: mkdir /tmp/img ; docker export $(docker create centos) | tar -C /tmp/img/ -xvf -
# before this script
import os
import ctypes
from multiprocessing import Process
CLONE_NEWUSER = 0x10000000
CLONE_NEWPID = 0x20000000
import json
from eth_utils import encode_hex
from web3 import HTTPProvider, Web3
from solc import compile_source
from web3.contract import ConciseContract
# Solidity source code
contract_source_code = '''
// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through `node <script>`.
// When running the script with `hardhat run <script>` you'll find the Hardhat
// Runtime Environment's members available in the global scope.
const hre = require("hardhat");
async function main() {
// Hardhat always runs the compile task when running scripts through it.
// If this runs in a standalone fashion you may want to call compile manually
// to make sure everything is compiled