Skip to content

Instantly share code, notes, and snippets.

@eldondev
eldondev / CertBotNearlyFreeSpeechAuthHook.sh
Last active March 16, 2024 15:03 — forked from UnixSage/CertBotNearlyFreeSpeechAuthHook.sh
Drop in script for CertBot's --manual-auth-hook switch for DNS Hosted at NearlyFreeSpeech.com
#!/bin/bash
exec 19>/tmp/"${CERTBOT_DOMAIN}"."$(date +%F-%s)".certbot.log
export BASH_XTRACEFD=19
set -x
API_KEY="##NFS-API-KEY##"
LOGIN="##NFS-USER##"
updatedns() {
@eldondev
eldondev / cmd
Last active December 4, 2023 16:33
Because everyone needs a good preseed
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
wget -nc http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
cp -nv ~/.ssh/id_rsa.pub .
qemu-system-x86_64 -machine accel=kvm -kernel linux -initrd initrd.gz -m 1G -smp 2 -append "blacklist=vga16fb fb=false video=false vga=normal auto=true url=http://10.0.2.10:8080/debian-preseed.txt hostname=otto domain=" -net user,guestfwd=:10.0.2.10:8080-cmd:"/bin/busybox httpd -i" -hda /dev/shm/deb.img -net nic -display none
@eldondev
eldondev / Dockerfile
Last active June 1, 2022 16:59
zxing dockerfile
FROM java
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/javase/3.2.2-SNAPSHOT/javase-3.2.2-20151101.162926-3.jar
RUN wget https://oss.sonatype.org/content/repositories/snapshots/com/google/zxing/core/3.2.2-SNAPSHOT/core-3.2.2-20151101.162918-3.jar
RUN wget https://repo1.maven.org/maven2/com/beust/jcommander/1.48/jcommander-1.48.jar
ENTRYPOINT ["java","-cp", "core-3.2.2-20151101.162918-3.jar:javase-3.2.2-20151101.162926-3.jar:jcommander-1.48.jar", "com.google.zxing.client.j2se.CommandLineRunner"]
@eldondev
eldondev / gist:5980868
Created July 12, 2013 01:58
How to decrypt wpa2 packets and use tshark to display cookies. You need to replace wlan1 with whichever wireless adapter you want to use, the bssid, the channel, and the wpa password.
airmon-ng start wlan1
airodump-ng mon0 --bssid 00:16:B6:DA:XX:XX --channel 6
tshark -i mon0 -o wlan.enable_decryption:TRUE -o wlan.wep_key1:wpa-pwd:<the_wpa_password> -R "http.cookie" -T fields -e http.cookie
@eldondev
eldondev / traefik.toml
Created January 12, 2017 06:16
A Treafik configuration file with let's encrypt, https redirection, and hot reloading.
graceTimeOut = 10
traefikLogsFile = "log/traefik.log"
accessLogsFile = "log/access.log"
logLevel = "INFO"
defaultEntryPoints = ["http", "https"]
onDemand = true
OnHostRule = true
[entryPoints]
[entryPoints.http]
address = ":80"
@eldondev
eldondev / WhyAllwinner.md
Last active July 16, 2016 19:34
Why Allwinner

What is this all about

What has been going on?

  • Chips have been getting faster
    • Kind of topped out due to physics, but science advances all the time.
  • Instead, chips have been getting bigger
    • Adding Cores only makes properly architected systems faster, so what to do with all of those extra cores?

Virtualization

  • Makes programmers happy, because we can just say "restart the vm" rather than try to debug that old, poorly written program
@eldondev
eldondev / talk.slide
Created February 25, 2015 06:57
Lightning talk on go version of inetd for docker containers
Lightning Talk: inetd in Go for Docker
Reincarnating a 1980s tech with today's tools.
Eldon
docker.inetd@eldondev.com
* Disclaimer:
This is a lightning talk.
- It has not been reviewed.
- There will probably be lies, damn lies, and a demo.
{
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": "1384813641058",
"to": "1384816485502"
}
}
@eldondev
eldondev / bf.py
Created October 16, 2013 14:16
morning pre-coffee kata
registers = {
'pointer' : 0,
'ip' : 0,
}
space = [0]*30000
program =[]
import sys
def inc_p():
registers['pointer'] += 1
@eldondev
eldondev / server.py
Last active December 23, 2015 18:59
Tornado static file index.html
application = tornado.web.Application([
(r"/()$", tornado.web.StaticFileHandler, {'path':'static/index.html'}),
(r"/(.*)", tornado.web.StaticFileHandler, {'path':'static/'}),
])