Skip to content

Instantly share code, notes, and snippets.

View marcboeker's full-sized avatar

Marc Boeker marcboeker

View GitHub Profile
random: Trying to read entropy from /dev/random
Configuration file: etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Using driver-based off-channel TX
interface=wlan0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=www.example.com
hw_mode=g
channel=6
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
@marcboeker
marcboeker / reload_nginx.sh
Created October 15, 2014 16:40
Reload nginx
kill -HUP `cat /var/logs/nginx.pid`
@marcboeker
marcboeker / remove_from_git.sh
Created October 15, 2014 16:41
Remove file or directory from Git
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch imgs" HEAD
git filter-branch --tree-filter 'rm -fr imgs' HEAD
@marcboeker
marcboeker / ssh_forward.sh
Created October 15, 2014 16:42
Forward remote port via SSH
ssh -nNT -g -R 9000:localhost:3000 user@remote_server
@marcboeker
marcboeker / authme.sh
Last active June 27, 2016 13:52 — forked from nutrun/gist:252619
SSH password less auth
# twitter.com/michael_jones wrote me
# Put in ~/.profile, or similar
# Use like "authme someuser@someserver"
function authme {
ssh $1 'cat >>~/.ssh/authorized_keys' <~/.ssh/id_rsa.pub
}
dm ssh dev "sudo -- sh -c 'mkdir /Users; mount -t fuse.vmhgfs-fuse .host:/Users /Users -o defaults,allow_other,uid=1000,nonempty'"
@marcboeker
marcboeker / openai_tool_calling.go
Created January 14, 2024 21:19
OpenAI tool calling in Go
package main
import (
"context"
"fmt"
openai "github.com/sashabaranov/go-openai"
"github.com/sashabaranov/go-openai/jsonschema"
)