Skip to content

Instantly share code, notes, and snippets.

View joriaty-ben's full-sized avatar
:octocat:
daily madness

syncosync joriaty-ben

:octocat:
daily madness
  • other solar system
View GitHub Profile

This is a result from python.section.md and it has a lack of full explanation. For me its kinda reminder how to start.

  1. Global installation of Python in configuration.nix in environment.systemPackages with e.g. (python36.withPackages(ps: with ps; [ numpy ])) here i chose python 3.6 any ohter version should work that way.
  2. Create a nix expression like python.nix with all dependencies for Python:
with import <nixpkgs> {};

(python35.withPackages (ps: [ps.numpy ps.toolz])).env

This guide results from the official NixOS manual installation guide. I tried to follow exactly the official manual and had to face some issues. I installed NixOs 19.03 from an bootable USB to Lenovo t420s (previous OS Win10) with UEFI.

  1. Created bootable USB stick on different machine with linux (Ubuntu 18.04 OS). (if you want to clear the stick completely before: sudo dd if=/dev/zero of=/dev/sdX bs=1k count=2048 ) Due to this format to vfat/fat32: sudo umount /dev/sdX sudo mkfs.vfat /dev/sdb1 then
@joriaty-ben
joriaty-ben / slack_webhook_post.py
Last active August 24, 2019 12:23 — forked from devStepsize/slack_webhook_post.py
POST a JSON payload to Slack via Webhook
import json
import requests
data = open('message.json', 'r').read()
def post_to_slack(message):
webhook_url = 'https://hooks.slack.com/webhook'
slack_data = json.dumps({'blocks': message})
response = requests.post(
webhook_url, data=slack_data,

tmux cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname