Skip to content

Instantly share code, notes, and snippets.

View ligurio's full-sized avatar
💥

Sergey Bronnikov ligurio

💥
View GitHub Profile
@amosr
amosr / House.v
Last active September 11, 2019 10:45
Coq text adventure
Set Implicit Arguments.
Inductive Place
:= Kitchen | Bedroom | Hallway | Outside.
Inductive Card := NORTH | EAST | SOUTH | WEST.
Definition moveTo (p : Place) (c : Card) : option Place :=
match p, c with
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@reyk
reyk / vmctl start ubuntu -d ubuntu-16.10-server-cloudimg-amd64.raw -n nat -c
Last active July 8, 2021 04:09
OpenBSD vmm and meta-data running ubuntu-16.10-server-cloudimg-amd64.raw
- Get OpenBSD from http://www.openbsd.org/ ;)
- Find an Ubuntu cloud image on https://cloud-images.ubuntu.com/
- Get https://github.com/reyk/meta-data and configure it for cloud-init
- Run the VM ...
Script started on Thu Mar 30 01:53:50 2017
# qemu-img convert ubuntu-16.10-server-cloudimg-amd64.img ubuntu-16.10-server-cloudimg-amd64.raw
# vmctl start ubuntu -d ubuntu-16.10-server-cloudimg-amd64.raw -n nat -c
Connected to /dev/ttyp6 (speed 9600)
Changing serial settings was 0/0 now 3/0
@torbiak
torbiak / groff-install-font
Last active November 21, 2023 21:26
Install ttf and otf fonts for use with groff
#!/usr/bin/env bash
# groff-install-ttf converts a TrueType (ttf) or OpenType (otf) font to a
# Printer Font ASCII (pfa) font and a groff font (ditroff) and installs them to
# groff's site-font directory.
#
# Requires fontforge.
#
# You're the best, Peter Schaffter, but contrary to the verbose and
# difficult-to-follow http://www.schaffter.ca/mom/momdoc/appendices.html#fonts,
# the t42 file doesn't seem to be necessary, at least with recent versions of
@afresh1
afresh1 / get_dns_blacklists.sh
Last active June 12, 2018 19:55 — forked from tvlooy/get_dns_blacklists.sh
Block ads by DNS
#!/bin/sh
# "include: /var/unbound/etc/ad-blacklist.conf" in /var/unbound/etc/unbound.conf
# run script as daily cron
TMPFILE=$( mktemp get_dns_blacklists-XXXXXXXXX )
trap 'rm -f $TMPFILE; exit 1' EXIT KILL INT QUIT TERM
(
ftp -VM -o- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | grep ^0.0.0.0 | awk '{ print $2 }'
@Arinerron
Arinerron / root.sh
Last active March 7, 2024 09:24
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@qbit
qbit / OpenBSD ROFI Theme
Created July 21, 2016 15:54
ROFI theme using similar colors to the OpenBSD login screen.
! ------------------------------------------------------------------------------
! ROFI OpenBSD theme
! ------------------------------------------------------------------------------
rofi.color-enabled: true
rofi.color-window: #798a99, #99aab9, #99aab9
rofi.color-normal: #99aab9, #eeeeff, #99aab9, #798a99, #eeeeff
rofi.color-active: #798a99, #fffa06, #99aab9, #99aab9, #fffa06
rofi.color-urgent: #fdf6e3, #dc322f, #eee8d5, #dc322f, #fdf6e3
@nathan-osman
nathan-osman / win32.go
Last active August 31, 2023 22:01
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
OpenBSD 6.0-beta (GENERIC.MP-vmm) #5: Fri Jun 3 16:44:43 CEST 2016
reyk@bsd.plumbing:/usr/src/sys/arch/amd64/compile/GENERIC.MP-vmm
real mem = 17024200704 (16235MB)
avail mem = 16503730176 (15739MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7bfb000 (65 entries)
bios0: vendor LENOVO version "N1FET38W (1.12 )" date 03/30/2016
bios0: LENOVO 20FBCTO1WW
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###