Skip to content

Instantly share code, notes, and snippets.

View codemicro's full-sized avatar

akp codemicro

  • UoB
  • Inside your computer
  • 17:00 (UTC +01:00)
View GitHub Profile
import serial
class Talker:
TERMINATOR = '\r'.encode('UTF8')
def __init__(self, timeout=1):
self.serial = serial.Serial('/dev/ttyACM0', 115200, timeout=timeout)
def send(self, text: str):
@ssddanbrown
ssddanbrown / update-bookstack.sh
Last active November 18, 2020 23:23 — forked from codemicro/update-bookstack.sh
Update a BookStack installation while also talking a backup
#!/bin/bash
# BookStack backup & update script
# Forked from codemicro: https://gist.github.com/codemicro/f9dc94ecf5831772e1bff92dfba337d0
########### CONFIG ###########
# Configure this to be the location where BookStack is installed.
# Do not include a trailing slash
BOOKSTACK_DIR="/var/www/bookstack"
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active April 22, 2024 13:01
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@jordanpotti
jordanpotti / xml-attacks.md
Created December 7, 2017 13:11 — forked from mgeeky/xml-attacks.md
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.


@ygotthilf
ygotthilf / jwtRS256.sh
Last active May 4, 2024 09:43
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@josephspurrier
josephspurrier / aescmd.go
Created December 23, 2014 07:11
Golang - Encrypt, Decrypt, File Read, File Write, Readline
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
@davidjrice
davidjrice / punctuation.js
Created April 30, 2014 22:16
List of punctuation characters
var PUNCTUATION = "" +
"’'" + // apostrophe
"()[]{}<>" + // brackets
":" + // colon
"," + // comma
"‒–—―" + // dashes
"…" + // ellipsis
"!" + // exclamation mark
"." + // full stop/period
"«»" + // guillemets