Skip to content

Instantly share code, notes, and snippets.

View daniel-santos's full-sized avatar

Daniel Santos daniel-santos

  • Texas, USA, Earth, Sol, Milky Way, Laniakea
View GitHub Profile
@nlitsme
nlitsme / decodesms.pl
Last active December 20, 2022 23:16
perl script for decoding raw hex sms PDU data
#!perl -w
# by Willem Hengeveld <[email protected]>
# license: http://en.wikipedia.org/wiki/Beerware
use strict;
$|=1;
# this script decodes raw smsses, as used with the
# AT+CMT, or AT+CMGR, or AT+CMGS commands
# either parses hex strings on the commandline, or from stdin.
@nfisher
nfisher / reflect_test.go
Last active January 18, 2024 15:53
Golang - Benchmark of new vs reflect.New.
package main_test
import (
"reflect"
"testing"
)
type fluff struct {
Name string
}
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active November 4, 2024 04:45
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@cskeeters
cskeeters / broadcast_calc.sh
Created December 8, 2016 19:17
Bash script for calculating network and broadcast addresses from ip and netmask or CIDR Notation
#!/bin/bash
# Calculates network and broadcast based on supplied ip address and netmask
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0
# Usage: broadcast_calc.sh 192.168.0.1/24
tonum() {
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then
@nolanlawson
nolanlawson / how_to_check_signal_apk.md
Last active June 22, 2023 18:28
How to check Signal APK SHA256 fingerprint

To verify the SHA256 fingerprint of a Signal APK you downloaded from their website, use apksigner on the command line, like so:

/path/to/android-sdk/build-tools/26.0.2/apksigner verify --print-certs \
    /path/to/Signal-website-release-4.12.3.apk | grep SHA-256
> dSigner #1 certificate SHA-256 digest: 29f34e5f27f211b424bc5bf9d67162c0eafba2da35af35c16416fc446276ba26
echo 29:F3:4E:5F:27:F2:11:B4:24:BC:5B:F9:D6:71:62:C0 EA:FB:A2:DA:35:AF:35:C1:64:16:FC:44:62:76:BA:26 \
@nmarley
nmarley / README.md
Last active September 24, 2024 08:12
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles