Skip to content

Instantly share code, notes, and snippets.

View iToto's full-sized avatar
:octocat:
Helping to improve IAM @ GitHub

Salvatore D'Agostino iToto

:octocat:
Helping to improve IAM @ GitHub
View GitHub Profile
@iToto
iToto / reset_routing_table.sh
Created December 7, 2016 05:11 — forked from midwire/reset_routing_table.sh
Reset routing table on OSX
#!/usr/bin/env bash
# Reset routing table on OSX
# display current routing table
echo "********** BEFORE ****************************************"
netstat -r
echo "**********************************************************"
for i in {0..4}; do
sudo route -n flush # several times
@iToto
iToto / Swift iOS Platform Type
Last active August 29, 2015 14:28 — forked from khoogheem/Swift iOS Platform Type
Swift Version of getting the Device information... Tuple based.. provides Device type, description and optional version number
public class Diagnostics : NSObject {
//MARK: Device Platform
/** A String value of the device platform information */
private class var platform: String {
// Declare an array that can hold the bytes required to store `utsname`, initilized
// with zeros. We do this to get a chunk of memory that is freed upon return of
// the method
var sysInfo: [CChar] = Array(count: sizeof(utsname), repeatedValue: 0)
{
"folders": [
{
"follow_symlinks": true,
"path": "."
}
],
"build_systems": [
{
"name": "Xcode Build",