Skip to content

Instantly share code, notes, and snippets.

View georgejecook's full-sized avatar

George Cook georgejecook

View GitHub Profile
@georgejecook
georgejecook / gist:2697011
Created May 14, 2012 21:05
starview is coming out black when scale is smaller
//
// Created by georgecook on 13/05/2012.
//
// To change the template use AppCode | Preferences | File Templates.
//
#import "TTStarView.h"
#import "UIView+FrameAdditions.h"
@georgejecook
georgejecook / gist:2716202
Created May 17, 2012 04:02
wtf is wrong with this tableview? - didSelectIndexPath is returning wrong values - and first touch selects the row, but didSelectIndexPath is not called
@interface OVChannelViewController : UIViewController <OVChannelManagerDelegate, UITableViewDataSource, UITableViewDelegate>
@property (strong, nonatomic) NSArray *channels;
@property (strong, nonatomic) UITableView *tableView;
@end
//
@georgejecook
georgejecook / gist:3536957
Created August 30, 2012 18:35
something causes the code to crash at the alive4 in addPlayerLayer.. _playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
//////////////////////////////////////////////////////////////
#pragma mark video layer initialization
//////////////////////////////////////////////////////////////
- (void)initializePlayer {
[self cleanup:YES];
if (!self.player) {
self.player = [[AVPlayer alloc] init];
[self.layer setMasksToBounds:YES];
@georgejecook
georgejecook / gist:3785001
Created September 25, 2012 23:07
this blows up at the method invocation [super.position = position is fine]
- (void)setPosition:(CGPoint)position {
if (self.isInPlasma){
_CCSpriteSetPositionMethod = class_getInstanceMethod([CCSprite class], @selector(setPosition:));
((void(*)(id, SEL, CGPoint))_CCSpriteSetPositionMethod)(self, @selector(setPosition:), ccp(position.x, position.y- 100));
} else {
super.position = position;
}
}
@georgejecook
georgejecook / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@georgejecook
georgejecook / FastCell.cs
Created May 4, 2015 05:20
butter smooth performance in xamarin forms listview
using System;
using Xamarin.Forms;
namespace TwinEvents.Core.Media.View
{
public class FastCell : ViewCell
{
}
}
using System;
using Xamarin.Forms;
using System.Windows.Input;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.ComponentModel;
using System.Threading.Tasks;
[assembly:
InternalsVisibleTo ("TwinTechsLib.iOS"),
@georgejecook
georgejecook / INavigationService.cs
Last active November 7, 2018 10:08
ADVANCED XAMARIN FORMS TECHNIQUES FOR FLEXIBLE AND PERFORMANT CROSS PLATFORM APPS - PART 5, PAGE IN PAGE EMBEDDING.
public interface INavigationServiceProvider
{
/// <summary>
/// Toggles the toolbar visibility
/// </summary>
/// <param name="showing">If set to <c>true</c> showing.</param>
/// <param name="animated">If set to <c>true</c> animate.</param>
void ToggleToolbar (bool showing, bool animated = true);
/// <summary>
/***********************************************
* Copyright ? Far-Flung Creations Ltd.
* Author: Marius George
* Date: 25 October 2017
* Email: marius@farflunggames.com
* DISCLAIMER: THE SOURCE CODE IN THIS FILE IS PROVIDED ?AS IS? AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL FAR-FLUNG CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU OR A THIRD
@georgejecook
georgejecook / run-signing-client.ts
Created October 5, 2019 02:02
how do I call run() from command line? this is ts file
import { SigningClient } from './signing-client';
const awsVars = {
awsAccessKey: process.env.AWS_KEY_ID,
awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
s3BucketName: process.env.S3_BUCKET_NAME,
awsRegion: process.env.AWS_REGION,
assetsHost: process.env.ASSETS_HOST,
zappToken: process.env.ZAPP_TOKEN,
zappPath: 'zapp'