This file contains hidden or 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
| #!/bin/sh | |
| # cgrep - multiline context grep using sed | |
| # Usage: cgrep [-context] pattern [file...] | |
| n=3 | |
| case $1 in -[1-9]*) | |
| n=`expr 1 - "$1"` | |
| shift | |
| esac | |
| re=${1?}; shift |
This file contains hidden or 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 bash | |
| # Ensure only one file at a time | |
| if [[ $# -ne 1 ]] | |
| then | |
| echo "" | |
| echo "Usage $0 path/to/file.feature" | |
| echo "" | |
| exit 1 | |
| fi |
This file contains hidden or 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
| #import "ViewController.h" | |
| #import "MKInterstitialView.h" | |
| @interface ViewController () <MKInterstitialViewDelegate> | |
| @property (strong, nonatomic) MKInterstitialView *interstitialView; | |
| @end | |
| @implementation ViewController |
This file contains hidden or 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
| #import "AppDelegate.h" | |
| #import "MKManager.h" | |
| @implementation AppDelegate | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| [[MKManager sharedManager] registerWithAppKey:@"APP KEY" | |
| secret:@"APP SECRET" | |
| successHandler:^(void) { |
This file contains hidden or 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
| public class InternetConnectivity : MonoBehaviour | |
| { | |
| public float maxTime = 5; | |
| public float currentTime = 0; | |
| const float successRetry = 20; | |
| const float failRetry = 2; | |
| public static bool hasConnection { get; private set; } | |
| public void OnEnable() { | |
| StartCoroutine( ConnectivityLoop() ); |
This file contains hidden or 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 a = new function() { | |
| this.name = "testing"; | |
| this.do = function() { | |
| console.log( "doing with " + this.name ); | |
| }; | |
| }; | |
| setTimeout( a.do.call( a ), 100 ); | |
| setTimeout( a.do, 100 ); |
This file contains hidden or 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
| function gooby() { | |
| if [ -n $1 ] && [ "$1" = "pls" ] | |
| then | |
| echo "fak you dolan" | |
| else | |
| echo "wat?" | |
| fi | |
| } |
NewerOlder