Skip to content

Instantly share code, notes, and snippets.

View ahalls's full-sized avatar

Andrew Halls ahalls

View GitHub Profile
@ahalls
ahalls / eatmemory.m
Created May 17, 2013 23:24
Some iOS objective C code that will allocate memory until a memory warning is received. Can drop it in anywhere just need to put a call to call to eatMemory in a button action or some other method when you want it to start chomping
- (void) didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
__memoryWarningReceived = YES;
// Release any cached data, images, etc that aren't in use.
}
static BOOL __memoryWarningReceived;
@ahalls
ahalls / GaggleMessengerErrorTests.swift
Last active August 29, 2015 14:06
GaggleMessengerErrors.swift
//
// GaggleMessengerErrorTests.swift
// GaggleMessenger
//
// Created by Andrew Halls on 9/3/14.
// Copyright (c) 2014 Gaggle. All rights reserved.
//
import Foundation
import XCTest
// Strid'n Fibinocci
//
//
// Insperation from Erica Sadun as she tries to make the standard while loop solution
// Swiftier
//http://ericasadun.com/2014/07/31/swift-project-euler-challenge-fibonacci/
//: Playground - noun: a place where people can play
import Foundation
struct Fibonacci : SequenceType {
let includesZero: Bool
init(includesZero: Bool = false) {
self.includesZero = includesZero
}
## INCOMPLETE - LOOP WILL GO ON FOREVER
lester_walker = 0
london_walker = 102
walking = True
while walking:
lester_walker += 1
london_walker -= 2
import random
#Questions, defining variables
questions = {
"strong": "Do you want it to be strong?",
"salty": "Is dis too salty for ya?",
"bitter": "Too bitty ehh?",
"sweet": "Sweet mama...!",
"fruitty": "Juicy Juicy ye",
}
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
class FunWithTimers: NSObject {
var timer: NSTimer?
GALTMB03:nativescript ahalls$ tns create testproject221
Project testproject221 was successfully created.
GALTMB03:nativescript ahalls$ cd testproject221/
GALTMB03:testproject221 ahalls$ tns run ios --log trace 2>&1 >>trace.log
2016-09-11 08:22:53.410 xcodebuild[50118:77004883] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XToDo.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-11 08:22:53.411 xcodebuild[50118:77004883] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-11 08:22:53.412 xcodebuild[50118:77004883] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared
GALTMB03:nativescript ahalls$ npm cache clear
GALTMB03:nativescript ahalls$ npm install -g nativescript
npm WARN excluding symbolic link docs/stylesheets/hightlight.css -> ../../node_modules/highlight.js/src/styles/solarized_light.css
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN excluding symbolic link docs/assets/ir_black.css -> ../../node_modules/highlight.js/src/styles/ir_black.css
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Resources -> Versions/Current/Resources
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Test Framework -> Versions/Current/Test Framework
npm WARN excluding symbolic link examples/TestFramework/Test Framework.framework/Versions/Current -> A
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
@ahalls
ahalls / Terminal Output
Created September 14, 2016 23:03
NativeScript 2.2.1 and Node 4.5
GALTMB03:nativescript ahalls$ rm -rf testproject*
GALTMB03:nativescript ahalls$ tns create testproject
Project testproject was successfully created.
GALTMB03:nativescript ahalls$ cd testproject/
GALTMB03:testproject ahalls$ tns run ios --log trace
execFile: /Users/ahalls/Library/Android/sdk/platform-tools/adb "help"
execFile: /Users/ahalls/Library/Android/sdk/platform-tools/adb "help"
spawn: /Users/ahalls/Library/Android/sdk/platform-tools/adb "--help"
Socket {