Skip to content

Instantly share code, notes, and snippets.

@seansaleh
seansaleh / macOS-remote-environment.md
Created September 20, 2022 16:57 — forked from DrPsychick/macOS-remote-environment.md
macOS / OSX ansible path test

INFO

  • remote SSH shell on macOS does not use /etc/paths
  • this is not an issue of ansible, it is the way macOS processes config files on remote shells:
  • see ssh localhost echo \$PATH

ANSIBLE executes remote shell /bin/sh

  • ...if not specified otherwise and macOS does not read any startup files
  • example: [...]localhost '/bin/sh -c '"'"'sudo -H -S -n -u test /bin/sh -c '"'"'"'"'"[...]
  • even /bin/bash does not read any startup files by default
@echo off
REM Thanks to users AlanWoke and Maxdec94 on Reddit
REM https://old.reddit.com/r/GlobalOffensive/comments/7kvuvc/this_script_will_let_you_easily_switch_between_2/dtjyhg7/
TITLE Select Steam account
taskkill.exe /F /IM steam.exe
cls
@seansaleh
seansaleh / maven-fiddler.md
Last active November 26, 2019 15:56 — forked from pspill/maven-fiddler.md
How do I capture Maven's HTTP traffic through Fiddler?
  1. In your Maven settings.xml file located at <Maven-Root-Directory>\conf, add the following XML snippet under the <proxies> tag.

    8888 is the port Fiddler listens to, which can be located in Fiddler under Tools | Options | Connections > in the textbox labeled "Fiddler listens on port".

<proxy>
  <id>Fiddler</id>
  <active>true</active>
  <protocol>https</protocol>
 127.0.0.1

Keybase proof

I hereby claim:

  • I am seansaleh on github.
  • I am seansaleh (https://keybase.io/seansaleh) on keybase.
  • I have a public key whose fingerprint is 13ED 6BEE 8FD6 235A A4B4 2C6E 0F0C 6142 B797 409C

To claim this, I am signing this object:

Add this to the end of kernel/test/kshell/kshell.c and declare it in the associated .h
int kshell_test(kshell_t *ksh,char *command)
{
char *args[10];
int argc = 0;
kshell_get_args(ksh, command, args, KSH_MAX_ARGS, &argc);
kshell_command_t *cmd;
if ((cmd = kshell_lookup_command(args[0], strlen(args[0]))) == NULL) {
kprintf(ksh, "kshell: %s not a valid command\n", args[0]);