Skip to content

Instantly share code, notes, and snippets.

View vroman's full-sized avatar

Víctor Román Archidona vroman

View GitHub Profile
@thomaspoignant
thomaspoignant / Makefile
Last active April 5, 2024 08:50
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@Overbryd
Overbryd / unbound.conf
Created March 29, 2019 14:54
A pretty good unbound.conf, DNSSEC, caching and local forwarding
remote-control:
control-enable: yes
server:
do-ip6: no
do-ip4: yes
do-udp: yes
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
num-threads: 4
# Enable logs
verbosity: 1
@dlangille
dlangille / 1 - I plan to turn these off
Last active March 21, 2024 13:25
Periodic things to turn off in FreeBSD jails
# after reviewing /etc/defaults/periodic.conf I have decided
# to disable these items in jails
daily_status_disks_enable="NO"
daily_status_network_enable="NO"
daily_status_uptime_enable="NO"
# not needed on jails
daily_ntpd_leapfile_enable="NO"
@mischief
mischief / node_exporter
Created May 28, 2018 22:11
prometheus on openbsd
#!/bin/ksh
daemon="/usr/local/bin/node_exporter"
rc_bg=YES
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1
@MatthewVance
MatthewVance / unbound.conf
Last active January 13, 2024 02:38
Config for running Unbound as a caching DNS forwarder (performance settings optimized for Raspberry Pi 2).
server:
###########################################################################
# BASIC SETTINGS
###########################################################################
# Time to live maximum for RRsets and messages in the cache. If the maximum
# kicks in, responses to clients still get decrementing TTLs based on the
# original (larger) values. When the internal TTL expires, the cache item
# has expired. Can be set lower to force the resolver to query for data
# often, and not trust (very large) TTL values.
cache-max-ttl: 86400
@tqh
tqh / haiku_efi.md
Last active March 6, 2022 18:23
My Haiku efi setup
  • In the haiku directory I have a directory efi/ and in it a link haiku_loader.efi -> ../generated/objects/haiku/x86_64/release/system/boot/efi/haiku_loader.efi

  • Haiku is configured with: ./configure --build-cross-tools x86_64 ../buildtools

  • Haiku EFI loader is build with: jam -q -sHAIKU_BOOT_PLATFORM=efi haiku_loader.efi

  • Haiku is built with: jam -q @nightly-anyboot

  • QEMU/kvm is started with (needs ovmf.fd):

    qemu-system-x86_64 -m 512M -cpu host -enable-kvm -nodefaults -smp 1,cores=2 \
        -vga std -net nic -net user -serial file:serial.log \
    

-chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \

@dannote
dannote / final-cut-pro-trial-reset.swift
Last active April 17, 2024 10:39
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
@bearice
bearice / idrac_kvm.sh
Created August 7, 2017 06:10
run Dell idrac Remote console from shell (POC)
#/bin/bash
HOST=$1
USER=root
PASS=calvin
RET=$(curl -s https://$HOST/data/login -duser=$USER -dpassword=$PASS -c .cookie -b .cookie -k)
ST1=$(echo "$RET" | awk 'match($0, /ST1=[0-9a-f]+/){ print substr( $0, RSTART, RLENGTH )}')
echo $ST1
PARAM="$HOST@0@$HOST@0@$ST1"
curl -s "https://$HOST/viewer.jnlp($PARAM)" -c .cookie -b .cookie -k > start.jnlp
javaws start.jnlp
@reagent
reagent / 00_README.md
Last active January 29, 2024 13:31
Custom HTTP Routing in Go

Custom HTTP Routing in Go

Basic Routing

Responding to requests via simple route matching is built in to Go's net/http standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe to have the default request handler invoked on each request. For example:

package main

import (
@lucasw
lucasw / open_source_dos_games.md
Last active January 1, 2024 07:45
Open Source DOS Games

Actual dos games that could at least theoretically be recompiled with the right dos tools, and then played in dosbox or on real hardware.

Doom doesn't count because the dos source is not available.

Look at http://dosgames.com/forum/about19706.html