Skip to content

Instantly share code, notes, and snippets.

View kramse's full-sized avatar

Henrik Kramselund kramse

View GitHub Profile
@kramse
kramse / git-pushing-multiple.rst
Created January 16, 2024 10:04 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@kramse
kramse / dmesg
Created February 23, 2019 15:49
FreeBSD 12 on Librem 15v4
root@kate:~ # dmesg
---<<BOOT>>---
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT(vga): resolution 640x480
CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (2904.13-MHz K8-class CPU)
@kramse
kramse / dmesg.boot
Last active February 23, 2019 15:03
OpenBSD 6.4 Librem 15v4
Only 4Gb mem currently
kate$ cat /var/run/dmesg.boot
OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 4188495872 (3994MB)
avail mem = 4057763840 (3869MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7aa9a020 (7 entries)
bios0: vendor coreboot version "4.8.1-Purism-4" date 01/20/2019
@kramse
kramse / fp-hashes.py
Created July 4, 2018 14:05 — forked from Neo23x0/fp-hashes.py
Typical False Positive Hashes
# Hashes that are often included in IOC lists but are false positives
HASH_WHITELIST = [
# Empty file
'd41d8cd98f00b204e9800998ecf8427e',
'da39a3ee5e6b4b0d3255bfef95601890afd80709',
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
# One byte line break file (Unix) 0x0a
'68b329da9893e34099c7d8ad5cb9c940',
'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc',
'01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b',
root@devops:~/bin# cat clean.sh
rm -rf /opt/concourse
mkdir /opt/concourse
dropdb --username=postgres atc
createdb --username=postgres atc
root@devops:~/bin# cat concourse.sh
#! /bin/sh
./concourse_linux_amd64 web \
--basic-auth-username hlk \
--basic-auth-password mypass \
Dockerfile:
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y file libblas-common libblas3 libexpat1 libffi6 libicu55 liblinear3 \\
liblua5.2-0 libmagic1 libpcap0.8 libpython-stdlib libpython2.7-minimal \\
libpython2.7-stdlib libsqlite3-0 libssl1.0.0 libxml2 libxslt1.1 lua-lpeg \\
mime-support ndiff nmap python python-bs4 python-chardet python-html5lib \\
python-lxml python-minimal python-pkg-resources python-six python2.7 \\
python2.7-minimal sgml-base xml-core curl gcc g++ make autoconf \\
openssl lua-json libssh2-1 libssl-dev libssl-doc zlib1g-dev
class Clavister < Oxidized::Model
# from test fw, has this prompt
# hlk-test:/>
# This works and result in cfg saved, with last prompt :-(
prompt /^*?:\/>\s*/
# --- More (1/4) ---
#expect /^--- More \(\d+\/\d+\) ---$/ do |data, re|
expect /^--- More \(\d+\/\d+\) ---/ do |data, re|
This is intended for https://code.google.com/p/logstalgia/
sudo tcpdump -q -i en1 -nn -tttt | grep IP | sed -E 's/\.[0-9][0-9][0-9][0-9][0-9][0-9] / /g' | tr '-' '/' | tr -d ',' | sed 's/\./ /4' | sed 's/\./ /7' | sed 's/: / /g'| awk -v date="$(date +"%d/%m/%Y")" '{ print $4 " \- \- \[" date "\:" $2 " \+0200] \"GET \/" $7 "\/" $9 "\/" $8 "\/ HTTP/1.1\" 200 " $10 " - -" }' | logstalgia -f --disable-glow -
Was hacked together because we thought logstalgia was cool, but wanted to show TCP packets