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
package main | |
import ( | |
"os" | |
"fmt" | |
"bufio" | |
"strconv" | |
) |
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
CFErrorRef error = NULL; | |
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(nil, &error); | |
if (error != NULL) { | |
NSLog(@"Error reading AddressBook: %@", error); | |
} | |
CFArrayRef contacts = ABAddressBookCopyArrayOfAllPeople(addressBook); | |
NSArray contactArray = CFBridgingRelease(contacts); |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"crypto/md5" | |
"encoding/hex" | |
) |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"encoding/hex" | |
"crypto/sha256" | |
) |
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
import "os" | |
func FileExists(File string) bool { | |
_, e := os.Stat(File) | |
if os.IsNotExist(e) { | |
return false | |
} |
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
NSLog(@"%s [Line %d] %@", __PRETTY_FUNCTION__, __LINE__, data); |
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
import "fmt" | |
import "time" | |
_, e := time.LoadLocation("America/Denver") | |
if e != nil { | |
fmt.Println("Timezone is not valid") | |
return | |
} |
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
## If IPTables conntrack is enabled and lots of connections are sucking up resources this can alleviate the problem | |
## This example is specific to DNS | |
/sbin/iptables -t raw -I OUTPUT -p udp --sport 53 -j NOTRACK | |
/sbin/iptables -t raw -I PREROUTING -p udp --dport 53 -j NOTRACK |
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
osascript -e 'display notification "That just happened" with title "Shake and Bake"' |
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
# Regular Old HTTPS | |
openssl s_client -connect my-host:443 -state -debug | |
# HTTPS w/ SNI | |
openssl s_client -connect my-host:443 -state -debug -servername my-host |
OlderNewer