Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
>>>>>>>>> ⚠️ 💥 ☠️

Sergio Rubio rubiojr

🚀
>>>>>>>>> ⚠️ 💥 ☠️
View GitHub Profile
@rcarmo
rcarmo / bt-agent.service
Last active Jul 2, 2021
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
View bt-agent.service
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target
@Skarlso
Skarlso / main.go
Created Feb 16, 2019
Golang SSH connection with hostkey verification
View main.go
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"golang.org/x/crypto/ssh"
kh "golang.org/x/crypto/ssh/knownhosts"
@Darkflib
Darkflib / gist:8c40e9e0bb60883bd70fb34972b5954a
Last active Apr 8, 2021
minio gateway to s3 compatible wasabi with cache + s3fs and ecryptfs
View gist:8c40e9e0bb60883bd70fb34972b5954a
mkdir /mnt/wasabi-cache
lvcreate -L 100G -n wasabi-cache vg0
mkfs.ext4 /dev/vg0/wasabi-cache
docker run -d -p 9000:9000 --name minio-wasabi -e "MINIO_CACHE_DRIVES=/mnt/wasabi-cache" -e "MINIO_CACHE_EXPIRY=40" \
-e "MINIO_ACCESS_KEY=AKKEYKEYKEYKEYKEY" -e "MINIO_SECRET_KEY=mysecret123123123123123" \
minio/minio gateway s3 https://s3.wasabisys.com:443
@DjinnGA
DjinnGA / prepare-iso.sh
Last active Apr 4, 2021
Convert MacOS 10.14 Mojave Beta Installer App To iso File
View prepare-iso.sh
#!/bin/bash
hdiutil create -o /tmp/Mojave.cdr -size 8g -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ 10.14\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ 10.14\ Beta
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso
@phelian
phelian / movmeta
Last active Aug 26, 2020
Golang: Read creation time from mov/mp4
View movmeta
package main
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
"os"
"time"
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active Nov 27, 2021
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@colinstein
colinstein / keychaincli.md
Last active Nov 26, 2021
Storing CLI password in Keychain on Mac OS X
View keychaincli.md

Secure CLI Passwords with Keychain Services on Mac OS X

Creating a Password

Dump a password into keychain. I'm using the creator/kind codes "asbl" for Ansible, but you can use any 4 character code. It's useful for doing lookups later.

$ security add-generic-password -a "root" -c "asbl" -C "asbl" -D "Ansible Vault" -s "ansible secrets" -w "secret123password456"

From man security:

@olov
olov / gist:eb60ab878eb73a7c5e22
Created Oct 15, 2014
listenandservetls_nossl30.go
View gist:eb60ab878eb73a7c5e22
// You don't want to serve HTTPS supporting for SSL3.0 any longer, see:
// http://googleonlinesecurity.blogspot.de/2014/10/this-poodle-bites-exploiting-ssl-30.html
import (
"crypto/tls"
"net/http"
)
// This code supports SSL3.0, TLS1.0, TLS1.1 and TLS1.2
// Chances are you currently do this but want to stop due to the POODLE
err := http.ListenAndServeTLS(addr, "crtfile", "keyfile", handler)
@tobstarr
tobstarr / Makefile
Created Jul 22, 2013
Golang SSH client
View Makefile
default:
@go get code.google.com/p/go.crypto/ssh
go build -o bin/test_ssh_client *.go