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
################################################################################# | |
# start and stop the vpn from the command line from now on with these two commands | |
# or rename the aliases as you see fit. | |
################################################################################# | |
alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'" | |
alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist" |
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
var allowPaste = function(e) { | |
e.stopImmediatePropagation(); | |
return true; | |
}; | |
document.addEventListener('paste', allowPaste, true); |
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
<?php | |
namespace AKUtils; | |
/** | |
* A simple template class for PHP. Allows you to create templates in pure PHP. | |
* There are many template systems like it, but this one is simple. | |
*/ | |
class Template | |
{ | |
private $_templateDir=""; |
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
// | |
// main.m | |
// NSURLWeirdness | |
// | |
// Created by Andrew Kehrig on 6/24/16. | |
// Copyright © 2016 dudid llc. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
<?php | |
/** | |
* I was given a really silly sorting question to write out in pseudo code once after spending 9 hours traveling | |
* to the HQ of the employer and running on about 3 hours of sleep. | |
* I figured I'd do poorly, and I did, but I explained my method. | |
* I just wasn't able to get the code on the board without constantly erasing and not having a clear head so I was | |
* passed over for another candidate. | |
* I named this interviewLulz because I find it lulzworthy when an employer uses sorting questions as their test when | |
* the sorting requested is: | |
* A) Ridiculous. |
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
mkdir /Volumes/MOUNTNAME; mount_smbfs //USERNAME:PASSWORD@HOST/PATH/TO/TIMEMACHINE/SPARSEBUNDLE /Volumes/MOUNTNAME; /usr/bin/hdiutil attach /Volumes/MOUNTNAME/YOURTIMEMACHINE.sparsebundle; |
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
// Generated on 2013-10-16 using generator-webapp 0.4.3 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { |
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 ruby | |
# | |
# This script can be used to check the in-store availability of the iPhone 5S. | |
# By default, it searches for all AT&T models. You can change this by editing | |
# the MY_DEVICES array below. While the Apple API supports searching for | |
# multiple devices at once, there is a limit. | |
# | |
# Once you have properly configured the MY_DEVICES array, you can run this script | |
# from the terminal. It takes a single parameter, which should be the zip code you | |
# wish to use for your search. |
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
SELECT | |
child.CONSTRAINT_NAME As constraint_name, | |
coninfo.CONSTRAINT_TYPE as constraint_type, | |
parent.TABLE_NAME As parent_table_name, | |
parent.COLUMN_NAME As parent_column_name, | |
child.TABLE_NAME As child_table_name, | |
child.COLUMN_NAME As child_column_name, | |
child.TABLE_SCHEMA As child_table_schema | |
FROM | |
QSYS2.SYSKEYCST child |
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
<?php | |
$origErrorTrackVal = ini_set('track_errors',1); | |
$oldReportingLevel = error_reporting(E_ALL); //least reporting necessary is E_NOTICE | |
$mixedUnserializedVal = unserialize(($someArr['someIndex'])); | |
/** | |
* This next conditional is fun. At this point $mixedUnserializedVal can legally be any value except "unset" | |
* You still have to check the error messages though :-/ | |
*/ | |
if(isset($mixedUnserializedVal) && preg_match('/Undefined\sindex:\ssomeIndex/', $php_errormsg) === 0) { | |
//do work |
NewerOlder