This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@discworld:~# cat /etc/sudoers.d/012_twoflower-nopasswd | |
twoflower discworld=(rincewind) /usr/bin/vi "" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ twoflower@discworld:/luggage$ sudo -l | |
Matching Defaults entries for twoflower on discworld: | |
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin | |
User twoflower may run the following commands on discworld: | |
(rincewind) /bin/cat /luggage/camera/* | |
$ twoflower@discworld:/luggage$ sudo -u rincewind cat /luggage/octavo/spell | |
Sorry, user twoflower is not allowed to execute '/bin/cat /luggage/octavo/spell' as rincewind on discworld. | |
$ twoflower@discworld:/luggage$ sudo -u rincewind cat /luggage/camera/../octavo/spell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/sudoers.d/012-twoflower | |
twoflower discworld=(rincewind) /bin/cat /luggage/camera/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Hi im a penguin | |
if [ "Linux" = "$(uname -a | awk '{printf $1}')" ] | |
then | |
#create symlinks | |
#root because kali | |
if [ "root" = "$(whoami)" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* EMOJI Pad | |
* ,-------------------------------. | |
* |TFLIP | TFlIP2|DISFACE| FU | | |
* |------+-------+-------+--------| | |
* | CLOUD| | | CLEAR | | |
* |------+-------+-------+--------| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=emu power | |
Wants=network-online.target | |
After=network-online.target | |
AssertFileIsExecutable=/home/pi/emu.py | |
[Service] | |
WorkingDirectory=/home/pi | |
User=pi |