Skip to content

Instantly share code, notes, and snippets.

Adam Lowther aklowther

Block or report user

Report or block aklowther

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aklowther
aklowther / get_ip-alfred3
Created Nov 12, 2018
Original script link is below. I modified it to show both my IPv4 and IPv6 external addresses on separate lines http://dferg.us/ip-address-workflow/
View get_ip-alfred3
LOCAL=$(ifconfig | grep -A 1 "en" | grep broadcast | cut -d " " -f 2 | tr "\\n" " ")
EXTERNAL6=$(curl --silent http://icanhazip.com -6)
EXTERNAL4=$(curl --silent http://icanhazip.com -4)
cat<<EOB
<?xml version="1.0"?>
<items>
<item uid="localip" arg="$LOCAL">
<title>Local IP: $LOCAL</title>
<subtitle>Press Enter to paste, or Cmd+C to copy</subtitle>
View keybase.md

Keybase proof

I hereby claim:

  • I am aklowther on github.
  • I am aklowther (https://keybase.io/aklowther) on keybase.
  • I have a public key ASCMRUamjhvezGjKnWd8RHGa9_xy_hL55Kv5DfsqRZvW-go

To claim this, I am signing this object:

@aklowther
aklowther / Log Define
Last active Dec 16, 2015
Replace NSLog for more info to where the printout is. Add to project .pch file to use in the whole project w/o needed imports
View Log Define
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#ifdef DEBUG
# define ULog(fmt, ...) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; }
#else
# define ULog(...)
@aklowther
aklowther / cutsomButton.qml
Created Feb 19, 2013
BB10 Cascades Button Replacement
View cutsomButton.qml
import bb.cascades 1.0
Container {
id: topLevelContainer
property alias buttonImage: buttonImage
property alias containerToChangeButtonBackground: buttonContainer.background
property bool buttonPressed: false
leftPadding: 2.0
topPadding: 2.0
rightPadding: 2.0
You can’t perform that action at this time.