Skip to content

Instantly share code, notes, and snippets.

@step21
step21 / keybase.md
Last active April 27, 2022 16:39
keybase.md

Keybase proof

I hereby claim:

  • I am step21 on github.
  • I am fl0_id (https://keybase.io/fl0_id) on keybase.
  • I have a public key ASB5JZ85eLvhyMHQvG9xX0U07Le7xwlTMHL_JQSxbCxciAo

To claim this, I am signing this object:

@step21
step21 / jupyter_solc_magic.md
Created December 28, 2020 14:13
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 -"

@step21
step21 / machine.js
Created August 29, 2020 14:40
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@step21
step21 / venv_wrapper
Created May 3, 2019 00:12 — forked from dbtek/venv_wrapper
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
# 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
@step21
step21 / harvest
Last active October 12, 2017 02:31
# 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 = "http://steinheim-institut.de/cgi-bin/epidat?id="
#baseurl for list of records
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
apps:
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 <lefteris@refu.co>, step21 <step21@devtal.de>
architectures: [amd64]
icon: ethereum_icon.png
#fix version
version: 0.1.5
type: app
#!/usr/bin/bash
echo "Checking the bus for any Nvidia cards.."
if lspci | grep NVIDIA
then
echo "Nvidia GPU detected!"
echo "Switching to Nvidia..."
if pacman -Qe | grep mesa-libgl
then
yes | pacman -S nvidia-libgl lib32-nvidia-libgl
@step21
step21 / gist:547e0c9b4bf070fb40972c1cc1ffefe4
Created September 14, 2016 15:52 — forked from taylor/gist:8701482603d44a7c0057
my laptop-mode config differences from working x230 to new x230
ac97-powersave.conf
auto-hibernate.conf
--- /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
step21 / tlp
Created September 14, 2016 15:52 — forked from orschiro/tlp
X230 Linux Configuration
# ------------------------------------------------------------------------------
# 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.
TLP_ENABLE=1
# Seconds laptop mode has to wait after the disk goes idle before doing a sync.