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
echo 'ATTRS{idVendor}=="3329", ATTRS{idProduct}=="4b19", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"' | sudo tee /etc/udev/rules.d/91-pulseaudio-audeze-gamedac.rules > /dev/null |
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
public static function varexport($expression): ?string | |
{ | |
return (new \Zend\Code\Generator\ValueGenerator($expression, \Zend\Code\Generator\ValueGenerator::TYPE_ARRAY_SHORT))->setIndentation(' ')->generate(); | |
} |
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
#spin up a container, run your command (or sh if not provided), then kill and remove it after you exit | |
function dr() { | |
docker run --rm -dt --name `echo $1 | tr -dC '[:alpha:]'` $1 >/dev/null && docker exec -it `echo $1 | tr -dC '[:alpha:]'` ${2:-sh}; docker kill `echo $1 | tr -dC '[:alpha:]'` > /dev/null | |
} |
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
nslookup host.docker.internal 2>/dev/null >/dev/null #test if host.docker.internal exists | |
if [ $? = 0 ]; then | |
# use that if available | |
echo "$(nslookup host.docker.internal 2>/dev/null | awk '/Address/ {print $3}') host.docker.internal" >> /etc/hosts | |
else | |
echo "$(ip route|awk '/default/ { print $3 }') host.docker.internal" >> /etc/hosts | |
fi |
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
### Keybase proof | |
I hereby claim: | |
* I am ascheret on github. | |
* I am vincenttan (https://keybase.io/vincenttan) on keybase. | |
* I have a public key ASBiKyf-bQlWLlls8DgrcjHaGRtzzDuCmMdr_B5lEIZJrgo | |
To claim this, I am signing this object: |