Skip to content

Instantly share code, notes, and snippets.

$ curl -u admin:changme https://<yoursplunkIP>:8089/servicesNS/nobody/system/data/inputs/http/?output_mode=json \
-d name=test_thing2 \
-d sourcetype=testing \
-d index=default \
--insecure -X POST | jq .entry[0].content.token -r
$ 38985917-f6c1-xxxx-xxxx-2c4e8c77798d
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
// Need to connec to the wifi somehow, set it up here
WiFiClient wifiClient;
String esid = "yournetwork";
String epass = "password";
// splunk settings and http collector token
String collectorToken = "8A5020D5-xxxx-xxxx-875A-E881ED0C6ABB";
@ridingintraffic
ridingintraffic / keymap.c-1
Created October 27, 2018 02:05
key layout
...
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* EMOJI Pad
* ,-------------------------------.
* |TFLIP | TFlIP2|DISFACE| FU |
* |------+-------+-------+--------|
* | CLOUD| | | CLEAR |
* |------+-------+-------+--------|
@ridingintraffic
ridingintraffic / keymap.c-2
Created October 27, 2018 02:12
hexcode ascii reactions
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
case CLOUD: // (っ◕‿◕)っ
if(record->event.pressed){
send_unicode_hex_string("0028 3063 25D5 203F 25D5 0029 3063");
}
return false;
break;
case FU: // t(-_-t)
keymap.c
....
/* tap dance time */
void tdexample1(qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
SEND_STRING(EXAMPLESTRING1);
reset_tap_dance (state);
}
}
void tdexample2(qk_tap_dance_state_t *state, void *user_data) {
@ridingintraffic
ridingintraffic / BFG-tldr
Last active November 9, 2018 21:48
BFG-tldr
# prework assuming macos
# visit for latest version https://rtyley.github.io/bfg-repo-cleaner/
# creates some folders, downloads bfg symlinks it and paths the file to your bash profile
mkdir -p /Users/$(whoami)/.local/bin/
curl -o /Users/$(whoami)/.local/bin/bfg-1.13.0.jar http://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar
chmod +x /Users/$(whoami)/.local/bin/bfg-1.13.0.jar
ln -s /Users/$(whoami)/.local/bin/bfg-1.13.0.jar /Users/$(whoami)/.local/bin/bfg
echo $PATH:/Users/$(whoami)/.local/bin/ >> /Users/$(whoami)/.bash_profile
source /Users/$(whoami)/.bash_profile
@ridingintraffic
ridingintraffic / hashcat
Last active December 10, 2018 08:56
luks and hashcat
$ dd if=/dev/urandom of=test bs=1M count=100
$ cryptsetup luksFormat test #use password password
$ cryptsetup luksOpen test tmp
$ xxd -l 512 /dev/mapper/tmp # is random data at this point
$ mkfs.ext4 /dev/mapper/tmp # use the same file system that is used by your system/device
$ xxd -l 512 /dev/mapper/tmp # should no longer be random data
$ cryptsetup luksClose tmp
$ cryptsetup luksDump test | grep "Payload offset" # add 1 to the offset value that comes back
$ dd if=test of=luks-header bs=512 count=4097 # grabs header
$ echo "password" >>list
@ridingintraffic
ridingintraffic / dotFileSetup.sh
Created December 2, 2018 01:34
dotFileSetup.sh
#!/bin/bash
# Hi im a penguin
if [ "Linux" = "$(uname -a | awk '{printf $1}')" ]
then
#create symlinks
#root because kali
if [ "root" = "$(whoami)" ]
then
@ridingintraffic
ridingintraffic / ..setup.sh
Last active January 20, 2020 18:26
dotfiles!
#!/bin/bash
#..setup.sh . double dots because gist, gets auto sorted (ugh)
# Hi im a penguin
if [ "Linux" = "$(uname -a | awk '{printf $1}')" ]
then
# this is handled is submodoules
#git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
#create symlinks
#/etc/sudoers.d/012-twoflower
twoflower discworld=(rincewind) /bin/cat /luggage/camera/*