Skip to content

Instantly share code, notes, and snippets.

View nwg's full-sized avatar

Nathaniel W Griswold 🇵🇸 nwg

  • Greater Milwaukee Area
View GitHub Profile
@nwg
nwg / pfdump.sh
Created June 26, 2021 05:32 — forked from vitaly/pfdump.sh
script to dump PF status
#!/bin/bash
function pfprint() {
if [ -n "$2" ];then
sudo pfctl -a "$2" -s"$1" 2>/dev/null
else
sudo pfctl -s"$1" 2>/dev/null
fi
}
#import <Socialize/Socialize.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//set the FB App Id, you can find your FB app Id here: https://developers.facebook.com/apps
[Socialize storeFacebookAppId:@"YOUR FB APP ID"];
//your extra code goes here
}
@nwg
nwg / appDelegate.m
Created January 25, 2012 20:03 — forked from imosquera/appDelegate.m
ios socialize sample snippets
//import the socialize header
#import <Socialize/Socialize.h>
#pragma mark
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// set the socialize api key and secret, register your app here: http://www.getsocialize.com/apps/
[Socialize storeConsumerKey:@"SOCIALIZE_CONSUMER_KEY"];
[Socialize storeConsumerSecret:@"SOCIALIZE_CONSUMER_SECRET"];
//your application specific code
@nwg
nwg / MyAppDelegate.m
Created January 24, 2012 18:37 — forked from imosquera/MyAppDelegate.m
smart notifications
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
// Don't handle notifications when in the foreground
if (application.applicationState != UIApplicationStateActive) {
return;
}
// Give Socialize a chance to handle this notification if it needs to
if ([Socialize handleNotification:userInfo]) {
return;
#import <Socialize/Socialize.h>
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [Socialize handleOpenURL:url];
}
@nwg
nwg / Authentication.m
Created December 13, 2011 19:21 — forked from FawadHa1der/Authentication.m
SocializeSDK iOS Code Snippets
// invoke the call
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"];
#pragma mark SocializeServiceDelegate implementation
// implement the delegate
-(void)didAuthenticate{
NSLog(@"Authenticated");
}
// if the authentication fails the following method is called
@nwg
nwg / Authentication.m
Created December 6, 2011 00:10 — forked from FawadHa1der/Authentication.m
SocializeSDK iOS Code Snippets
// invoke the call
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"];
#pragma mark SocializeServiceDelegate implementation
// implement the delegate
-(void)didAuthenticate{
NSLog(@"Authenticated");
}
// if the authentication fails the following method is called
@nwg
nwg / Authentication.m
Created November 16, 2011 18:06 — forked from FawadHa1der/Authentication.m
SocializeSDK iOS Code Snippets
// invoke the call
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"];
#pragma mark SocializeServiceDelegate implementation
// implement the delegate
-(void)didAuthenticate{
NSLog(@"Authenticated");
}
// if the authentication fails the following method is called
//import the socialize header
#import <Socialize/Socialize.h>
@interface Controller : UIViewController
@property (nonatomic, retain) SocializeActionBar *actionBar;
@end
#import <Socialize-iOS/Socialize.h>
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [Socialize handleOpenURL:url];
}