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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
# Catch ctrl c so we can exit cleanly | |
function control_c() { | |
echo Killing processes.. | |
killall dnsmasq | |
killall hostapd | |
/etc/init.d/networking restart | |
} | |
trap control_c SIGINT |
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 | |
IP=`docker inspect MyContainerName | grep 'IPAddress":' | cut -f4 -d'"' | head -1` && sudo tcpdump -i docker0 host $IP |
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
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' | Get-ItemPropertyValue -Name Release | Foreach-Object { $_ -ge 461808 } |
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 | |
sudo du -ah --max-depth=1 / | sort -hr |
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
apt-get -y update | |
#Terminator console emulator | |
apt-get -y install terminator | |
apt-get -y install bat | |
#Setup custom aliases | |
echo "alias ll='ls -l'" > .bash_aliases | |
echo "alias nmap='nmap -g53 --randomize-hosts --script-args http.useragent=\"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0i\" '" >> .bash_aliases | |
echo "alias cat='bat --style=grid'" >> .bash_aliases |
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
#Stop/Remove a specific Docker Container | |
docker stop containername && docker rm containername | |
#Stop all containers with "backend" in it: | |
docker rm $(docker ps -a | grep backend | cut -f1 -d' ') | |
#Stop all Docker Containers | |
docker stop $(docker ps -aq) | |
#Remove all Docker Containers |
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
Enable-PSRemoting | |
Get-Item WSMan:\localhost\Client\TrustedHosts | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'RemoteServerName' | |
#This weird thing is only needed if you still can't run WSMan commands even after enabling all the trust settings (https://web.archive.org/web/20110615172805/http://www.shirmanov.com/2011/04/winrm-access-is-denied-on-local.html) | |
#("Enable-PSRemoting" should do it for you, this just manually does it) | |
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f | |
#Load up a server list | |
[string[]]$ServerList = Get-Content C:\ALL-WEB-NORTHCENTRAL.lst |
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
connect: | |
sudo mysql --user=root | |
Show users and where they can connect from: | |
SELECT user,host FROM mysql.user; | |
Show user-specific privileges: | |
SHOW GRANTS FOR 'user'@'192.168.x.xx'; | |
Update user privileges: |
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
mkdir Codeios | |
cd Codeios/ | |
git clone --bare http://chrisweinert@bitbucket.servername.com:1234/scm/somename/ios.git | |
cd ios.git/ | |
git lfs fetch --all | |
git push --mirror https://companyname@dev.azure.com/companyname/Mobile/_git/ios |
OlderNewer