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 / 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
View get_ip-alfred3
LOCAL=$(ifconfig | grep -A 1 "en" | grep broadcast | cut -d " " -f 2 | tr "\\n" " ")
EXTERNAL6=$(curl --silent -6)
EXTERNAL4=$(curl --silent -4)
<?xml version="1.0"?>
<item uid="localip" arg="$LOCAL">
<title>Local IP: $LOCAL</title>
<subtitle>Press Enter to paste, or Cmd+C to copy</subtitle>

Keybase proof

I hereby claim:

  • I am aklowther on github.
  • I am aklowther ( on keybase.
  • I have a public key ASCMRUamjhvezGjKnWd8RHGa9_xy_hL55Kv5DfsqRZvW-go

To claim this, I am signing this object:

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__);
# define DLog(...)
#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]; }
# define ULog(...)
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.