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
My journey with PowerShell, Git, GitHub (CygWin, Strawberry Perl already installed) | |
PowerShell - already on Win7+ | |
-create profile folder ~/Documents/WindowsPowershell/ | |
-create modules folder ~/Documents/WindowsPowershell/Modules | |
-Keep this handy: http://technet.microsoft.com/en-us/library/ee692764.aspx | |
-recommend | |
installing Chocolatey: http://chocolatey.org/ (you'll need something like CPAN for Perl to keep track of PS stuff and other things) | |
to install: | |
cmd.exe> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin - See more at: http://chocolatey.org/#sthash.5KjLIpD5.dpuf |
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
Installing or reinstalling Cygwin... lots of packages. | |
Cygwin now has a -P command line for feeding comma separated list of packages to install. Should be easier then clicking all those boxes. | |
now using apt-cyg to install packages: https://code.google.com/p/apt-cyg/ | |
$wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg | |
$chmod +x apt-cyg | |
$mv apt-cyg /usr/local/bin | |
apt-cyg (not cyg-apt) was working... change in repos for Cygwin to differentiate between x86 (32-bit) and x86_64 breaks the apt-cyg script. Fix detailed in issue 31 (https://code.google.com/p/apt-cyg/issues/update.do?id=31#makechanges). Diff below will fix. |
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
Using PowerShell | |
ls|foreach-object {if ($_.subject -like "*entrust*") {$_|select-object @{Name="SigAlgo"; Expression={$_.SignatureAlgorithm.FriendlyName}},FriendlyName,Subject,NotBefore,NotAfter,Issuer}} | |
ls|foreach-object {if ($_.subject -like "*entrust*") {$_|select @{n="SigAlgo"; e={$_.SignatureAlgorithm.FriendlyName}},FriendlyName,Subject,NotBefore,NotAfter,Issuer}} | |
ls|where-object -filterscript {$_.subject -like "*entrust*"} | select @{n="SigAlgo"; e={$_.SignatureAlgorithm.FriendlyName}},FriendlyName,Subject,NotBefore,NotAfter,Issuer | |
ls|?{$_.subject -like "*entrust*"} | select @{n="SigAlgo"; e={$_.SignatureAlgorithm.FriendlyName}},FriendlyName,Subject,NotBefore,NotAfter,Issuer |
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
#To Powershell | |
#From Bash | |
powershell -inputformat none -noprofile echo hello | grep hello | |
#From cmd | |
powershell echo hello | |
#To Bash | |
#From Powershell | |
????? | |
#From cmd |
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
# Attempt to get TP Link TL-WN725N up on Kali | |
# uname -a: Linux kali 4.1.19-v7 #1 SMP Tue Mar 15 15:10:00 CDT 2016 armv7l GNU/Linux | |
# lsusb: Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter | |
# lsmod: nothing that looks like the 8188eu driver for this nic | |
# first step, get the source | |
wget https://github.com/lwfinger/rtl8188eu/tarball/master -O rtl8188eu.tar.gz | |
tar xvf rtl8188eu.tar.gz |
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
This covers both unmanaged (non-Network Manager) and Network Manager managed vlans | |
***For Unmanaged interfaces*** | |
need user-space util | |
$sudo apt-get install vlan | |
load 8021q mod | |
$sudo modprobe 8021q | |
make permanant with | |
$sudo su -c 'echo "8021q" >> /etc/modules' |
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
Ways to setup VLANs in Linux | |
Typical for Ubuntu | |
##use vconfig and ifconfig or ip | |
lsmod // modprobe 8021q | |
apt-get install vconfig -y | |
vconfig add <if> <vlanid> | |
ifconfig <if>.<vlanid> <ipaddr> netmask <mask> | |
or ip addr add <ipaddr>/<bitmask> dev <if>.<vlanid> |
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
openssl ciphers -v 'TLSv1.2:!NULL:!ADH:!kECDH:@STRENGTH' | |
/etc/httpd/conf/httpd.conf #section 1 - bottom | |
# | |
# Set Trace/Track off | |
TraceEnable Off | |
# | |
# configure FileETags | |
FileETag MTime Size |
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
Default LXDE/Openbox bindings | |
ACTION BINDING | |
Go to desktop (direction) ctrl + alt + arrow | |
Go to desktop (number) super + f1/f2/f3/f4 | |
Send to desktop shift + alt + arrow | |
Toggle show desktop super + d | |
Close window alt + f4 | |
Hide window alt + esc | |
Window menu alt + space |
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
# ~/.bash_aliases file source by ~/.bashrc | |
# https://gist.github.com/pcurylo/91a5664301695fdade07ab54b74fe56e | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias 'ls=ls --color=auto' | |
alias 'dir=dir --color=auto' | |
alias 'vdir=vdir --color=auto' | |
alias 'grep=grep --color=auto' | |
alias 'igrep=igrep --color=auto' |
OlderNewer