Skip to content

Instantly share code, notes, and snippets.

View pkramme's full-sized avatar
🔬

Paul Kramme pkramme

🔬
View GitHub Profile
package main
import "github.com/rivo/tview"
func main() {
app := tview.NewApplication()
MainPages := tview.NewPages()
QuitDialog := tview.NewModal().
SetText("Do you want to quit the application?").
@pkramme
pkramme / temp.py
Created June 9, 2019 15:26
Read temp value from DS1820 temp sensor connected to raspberry pi
#!/usr/bin/python3
from pathlib import Path
import sys
devicepath = "/sys/bus/w1/devices/"
devicerawtempfile = "w1_slave"
with Path(devicepath, sys.argv[1], devicerawtempfile).open() as rawtemp:
_, templine = rawtemp.readlines()
@pkramme
pkramme / wifikill.sh
Created July 28, 2017 22:27 — forked from FedericoPonzi/wifikill.sh
A Wifikill made in bash using nmap and arpspoof.
#!/bin/bash
#Federico Ponzi
#doylefermi
#chocolatkey
# GPLv2
usage()
{
echo "Usage: $0 [-all][-list][-i] xxx.xxx.xxx.xxx"
}
@pkramme
pkramme / go-platforms.json
Created May 26, 2017 19:59
All platform combinations go supports.
[
{
"GOOS": "android",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "android",
"GOARCH": "amd64",
"CgoSupported": true
@pkramme
pkramme / gist:13e17c979beabf231d884c69927920e6
Created May 6, 2017 16:07 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@pkramme
pkramme / tmux.cheat
Last active July 4, 2016 19:08 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@pkramme
pkramme / getch.h
Created July 3, 2016 14:48
getch.h
#ifndef _GETCH_H_
#define _GETCH_H_
#include <termios.h>
#include <unistd.h>
#include <stdio.h>
/* reads from keypress, doesn't echo */
int getch(void)
{
git config --global credential.helper 'cache --timeout=3600'