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
nmcli dev wifi connect <ssid> password <password> |
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
#! /usr/bin/perl | |
# | |
# Script written to pull IP data from openIOC and search Splunk. | |
# | |
use strict; | |
use warnings; | |
$|=1; |
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
{ | |
"clients": [ | |
{ | |
"id": "59761c23b30d971669fb42ff", | |
"isActive": true, | |
"age": 36, | |
"name": "Dunlap Hubbard", | |
"gender": "male", | |
"company": "CEDWARD", | |
"email": "dunlaphubbard@cedward.com", |
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
{"SecurityGroups": [{ "IpPermissionsEgress": [], "Description": "", "IpPermissions": [{ "PrefixListIds": [], "FromPort": "", "IpRanges": [{ "CidrIp": "" }], "ToPort": "", "IpProtocol": "", "UserIdGroupPairs": []}], "GroupName": "", "OwnerId": "", "GroupId": ""}]} |
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
{"EndpointGroups":[{"name":"Group1","Policies":[{"name":"Policy1","Rules":[{"name":"Rule1","protocol":"tcp","port":"22","direction":"out","ip-address":"0.0.0.0"}]}]}]} |
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
#!/usr/bin/env bash | |
set -e | |
EXITCODE=0 | |
# bits of this were adapted from lxc-checkconfig | |
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in | |
possibleConfigs=( | |
'/proc/config.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
#!/usr/bin/env bash | |
set -e | |
EXITCODE=0 | |
# bits of this were adapted from lxc-checkconfig | |
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in | |
possibleConfigs=( | |
'/proc/config.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
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
# Add new GPG key | |
sudo apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
# If the above keyserver is not available, try hkp://pgp.mit.edu:80 or hkp://keyserver.ubuntu.com:80. |
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
def extendedEuclid(a,b): | |
#print 'extendedEuclid of ',a,b | |
if b==0: | |
return (a,1,0) | |
tuplPrime = extendedEuclid(b,a % b) | |
return [tuplPrime[0], tuplPrime[2], (tuplPrime[1] - (a//b)*tuplPrime[2])] | |
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
/* | |
For some reason, the change() event only fires when the input field loses focus. | |
Binding to other options ('change keypress paste focus textInput input') will | |
fire the event several times, which is bad. The below code works even when | |
content is pasted into the text field, and only fires once as expected. | |
*/ | |
$('#search-form .term').bind('input', function(){ | |
console.log('this actually works'); | |
}); |