Skip to content

Instantly share code, notes, and snippets.

Avatar
🥀
🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀

Louis Taylor kragniz

🥀
🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀🥀
View GitHub Profile
@kragniz
kragniz / c_cpp_properties.json
Created Nov 13, 2019
How to use vscode for linux kernel module development against linux git
View c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/home/kgz/git/linux/include/generated",
"/home/kgz/git/linux/arch/x86/include/generated",
"/home/kgz/git/linux/arch/x86/include",
"/home/kgz/git/linux/include"
@kragniz
kragniz / this.sh
Created Jun 19, 2019
Create a x509 certificate ez (please come up in google next time I inevitably google for this)
View this.sh
openssl genrsa -out tls.key 2048
openssl req -new -key tls.key -out tls.csr
openssl x509 -req -days 365 -signkey tls.key -in tls.csr -out tls.crt
View sha-sync
#!/usr/bin/env python3
import os
import re
import time
import github3
gh = github3.login('kragniz', os.environ.get('password'))
View test.go
/*
go build test.go
# command-line-arguments
/nix/store/4lvfb1rwpf2cfyx3rf6ki8j0rkiqk5jm-go-1.8/share/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
collect2: error: ld terminated with signal 11 [Segmentation fault]
/nix/store/kxf1p7l7lgm6j5mjzkiwcwzc98s9f1az-binutils-2.23.1/bin/ld:
*/
package main
@kragniz
kragniz / docker-rm-all
Created Oct 31, 2016
Remove all docker images from a machine
View docker-rm-all
#!/bin/bash
docker ps --all | tail -n +2 | cut -d' ' -f1 | xargs docker rm -f
View timing-post-9160b64313bd6a0fe6524db472726bebd2e54dd9
Average loop time before: 0.30223002022114
Average loop time after: 0.11939632892614
60.5% decrease
View pythons.yml
Ubuntu:
'16.04': '3.5.1'
'15.10': '2.7.9'
'14.04': '2.7.5'
'12.04': '2.7.3'
Fedora:
'24': '3.5.1'
'23': '2.7.11'
@kragniz
kragniz / platformio-nixos.md
Created May 27, 2016
Getting platformio working with avrdude on NixOS
View platformio-nixos.md

To get it flashing, I had to run:

$ nix-shell -I nixpkgs=/home/kragniz/git/nixpkgs/ --pure -p platformio avrdude
$ rm /home/kragniz/.platformio/packages/tool-avrdude/avrdude
$ ln -s $(type avrdude) ~/.platformio/packages/tool-avrdude/avrdude
View gist:1b543973d13f445399f9
~/g/nixpkgs (rkt-v0.15.0) $ nix-shell -I nixpkgs=. --pure -p rkt sudo
[nix-shell:~/git/nixpkgs]$ /var/setuid-wrappers/sudo rkt --insecure-options=image run docker://redis
rkt: using image from local store for image name coreos.com/rkt/stage1-coreos:0.15.0
rkt: using image from local store for url docker://redis
run: group "rkt" not found, will use default gid when rendering images
Failed to setup network: error adding network "default": failed to locate iptabes: exec: "iptables": executable file not found in $PATH