Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
step21 /
Created Dec 28, 2020
solidity compiler (solc) in jupyter notebook

The line below gives an example of how to compile solidity code from a jupyter notebook cell. Replaces the '--ast-json' with whatever options or output you like, and adjust the binary to where your solc is. The dash at the end is necessary to signify stdin.

%alias_magic solidity script -p "/home/jovyan/.solcx/solc-v0.6.7 --ast-json -"

View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
step21 / venv_wrapper
Created May 3, 2019 — forked from dbtek/venv_wrapper
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
View venv_wrapper
# include following in .bashrc / .bash_profile / .zshrc
# usage
# $ mkvenv myvirtualenv # creates venv under ~/.venv/
# $ venv myvirtualenv # activates venv
# $ deactivate # deactivates venv
# $ rmvenv myvirtualenv # removes venv
export VENV_HOME="$HOME/.venv"
[[ -d $VENV_HOME ]] || mkdir $VENV_HOME
View harvest
# encoding=utf-8
import epidat_parse_bfs
from loc import loc
from poerelief import db, models
import untangle
#import db_access
#import pymongo as PyMongo
baseurl = ""
#baseurl for list of records
View aletheia-snapcraft.yml
name: aletheia # you probably want to 'snapcraft register <name>'
version: '0.3' # just for humans, typically '1.2+git' or '1.3.2'
summary: Aletheia decentralized scientific publishing # 79 char long summary
description: |
Aletheia is...
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
View geth-snap.yml
name: ethereum
summary: An Ethereum framework for Snappy Ubuntu
description: A framework providing all the essentials needed in order to develop for and interact with the Ethereum blockchain
#Not allowed anymore
#vendor: Lefteris <>, step21 <>
architectures: [amd64]
icon: ethereum_icon.png
#fix version
version: 0.1.5
type: app
echo "Checking the bus for any Nvidia cards.."
if lspci | grep NVIDIA
echo "Nvidia GPU detected!"
echo "Switching to Nvidia..."
if pacman -Qe | grep mesa-libgl
yes | pacman -S nvidia-libgl lib32-nvidia-libgl
step21 / gist:547e0c9b4bf070fb40972c1cc1ffefe4
Created Sep 14, 2016 — forked from taylor/gist:8701482603d44a7c0057
my laptop-mode config differences from working x230 to new x230
View gist:547e0c9b4bf070fb40972c1cc1ffefe4
--- /etc/laptop-mode/conf.d/auto-hibernate.conf 2014-09-07 13:38:23.000000000 -0500
+++ auto-hibernate.conf 2013-09-25 21:09:36.603610468 -0500
@@ -8,21 +8,21 @@
# Auto-hibernation settings
# -------------------------
-#__COMMENT Using these settings, you can make laptop mode tools automatically put your
-#__COMMENT computer into hibernation when the battery level goes critically low.
step21 / tlp
Created Sep 14, 2016 — forked from orschiro/tlp
X230 Linux Configuration
View tlp
# ------------------------------------------------------------------------------
# tlp - Parameters for power save
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
View Dockerfile.lanaidock
# / get debs from here / put into ./shared/ next to Dockerfile
# This builds docker image with lanai enabled clang
# lanaiclang packages should be in the directory "shared" together with this dockerfile
# two scripts are provided for clang-3.9 and llc executable. if additional ones are needed, these can be created by using a different entry point
FROM ubuntu:14.04
MAINTAINER Florian Idelberger <>
RUN apt-get update && apt-get install -y build-essential binfmt-support libxml2 python libobjc-4.8-dev lib32gcc1 lib32stdc++6 libc6-i386 libedit2 libpython2.7 libffi-dev libtinfo-dev libjs-jquery libjs-underscore python-six
COPY shared/* /tmp/