Skip to content

Instantly share code, notes, and snippets.

View scoutman57's full-sized avatar

Shannon Warren scoutman57

View GitHub Profile
// list of HTTP status codes
$httpStatusCodes = array(
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
@scoutman57
scoutman57 / anyconnect.scpt
Created May 18, 2016 14:30 — forked from andrewh/anyconnect.scpt
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server
-- 5. Trigger script from the menu
-- 6. Enjoy being connected
tell application "Cisco AnyConnect Secure Mobility Client"
activate
end tell
@scoutman57
scoutman57 / CiscoVPNConnection.scpt
Created May 18, 2016 14:25 — forked from twksos/CiscoVPNConnection.scpt
Cisco VPN connection auto connect AppleScript
-- Please set your vpn connection name and password here
set VPNName to "VPN name"
set VPNpassword to "VPN password"
tell application "System Events"
tell current location of network preferences
set VPNService to service VPNName
end tell
set isConnected to connected of current configuration of VPNService
@scoutman57
scoutman57 / schema_dump_from_frm_file.sh
Last active May 17, 2016 20:33
Create a schema dump from .frm tables in databases
#!/bin/bash
# Author: Shannon Warren
# scoutman57@gmail.com
# github: w2pc
# This script requires dbsake to be installed
# http://dbsake.readthedocs.io/en/latest/
echo "This script requires dbsake to be installed"
echo "http://dbsake.readthedocs.io/en/latest/"
@scoutman57
scoutman57 / tinder-api-documentation.md
Created December 25, 2015 00:16 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

@scoutman57
scoutman57 / DirectoryStructure
Last active September 7, 2015 18:43 — forked from satooshi/DirectoryStructure
Directory structure of Domain Driven Design application with Symfony2, Doctrine2.
sf2-ddd
├── app
├── bin
├── build
├── lib
├── src
│   └── __VendorPrefix
│   ├── Application
│   │   └── __DomainNameBundle
│   │   ├── Command
@scoutman57
scoutman57 / MapLocalDrive.vbs
Created July 28, 2015 03:55
Map Local Drive VB Script
Dim WshShell, FileShell, MapPrompt, WhatToDo, DrvLetter, TestDrvLetter, Dummy, Confirm
Dim BrowseDialogBox, SelectedFolder, FullPath, FullPathString, DrivePath, OpenWEX, TheLetters, MapDis
Dim TempDrvLetter, ColonTest, TheFile, IsLetter
Set WshShell = WScript.CreateObject("WScript.Shell")
Set FileShell = WScript.CreateObject("Scripting.FileSystemObject")
MapPrompt = "What would you like to do?" & vbCrLf & vbCrLf &_
" 1) Map Local Drive" & vbCrLf &_
@scoutman57
scoutman57 / Connect_IBM_VPN.sh
Created July 28, 2015 03:35
Connect IBM VPN - Apple Script
#!/usr/bin/osascript
tell application "System Events"
tell current location of network preferences
set VPNservice to service "IBM VPN"
if exists VPNservice then connect VPNservice
end tell
end tell
/*
0
909
89098
7890987
678909876
56789098765
4567890987654
345678909876543
23456789098765432
@scoutman57
scoutman57 / validate.php
Last active August 29, 2015 14:20
Validate domain or email address
<?php
/**
* @param $domain
* @return mixed
*/
function validateDomain($domain)
{
$ip = filter_var(gethostbyname($domain), FILTER_VALIDATE_IP);
// Will return the IP address if or false if the domain is not valid