Skip to content

Instantly share code, notes, and snippets.

View mjgaylord's full-sized avatar
🇿🇦

Michael Gaylord mjgaylord

🇿🇦
View GitHub Profile
Index: src/Three20UICommon/Sources/UIViewControllerAdditions.m
===================================================================
--- src/Three20UICommon/Sources/UIViewControllerAdditions.m (revision 1193)
+++ src/Three20UICommon/Sources/UIViewControllerAdditions.m (working copy)
@@ -294,10 +294,14 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)showBars:(BOOL)show animated:(BOOL)animated {
#if __IPHONE_3_2 && __IPHONE_3_2 <= __IPHONE_OS_VERSION_MAX_ALLOWED
- [[UIApplication sharedApplication] setStatusBarHidden:!show withAnimation:animated];
-#else
@jwang
jwang / Paths.xcconfig
Created February 9, 2011 08:16
Preliminary XCode4 Support for Three20. Paths.xcconfig lives in three20/src/common/Configuration Protect.command lives in three20/src/scripts
//
// Copyright 2009-2011 Facebook
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@radiospiel
radiospiel / localpod.mdown
Created March 9, 2012 22:41
How I use Cocoapod locally
  1. Preparation

Setup a local CocoaPods directory, and register it with CocoaPods

mkdir -p ~/CocoaPods/Local
(cd ~/CocoaPods/Local; git init)
pod repo add ~/CocoaPods/Local
  1. Update local CocoaPod
@nurey
nurey / gist:2255271
Created March 30, 2012 21:29
Get Gitbox.app and FileMerge working together again after upgrading Xcode to 4.3
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
@zwaldowski
zwaldowski / MainContextListener.java
Created April 8, 2013 17:49
App Engine Cloud Endpoints backed by Shiro
package com.dizzytechnology.appengine.server.generic;
import com.google.api.server.spi.guice.GuiceSystemServiceServletModule;
import com.google.inject.*;
import com.google.inject.servlet.GuiceServletContextListener;
import org.apache.shiro.config.Ini;
import org.apache.shiro.guice.web.ShiroWebModule;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
//
// ViewController.m
// AVPlayerCaching
//
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
//
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
@calebd
calebd / ArrayHelpers.swift
Last active November 4, 2022 15:17
Swift Helpers
extension Array {
func first() -> Element? {
if isEmpty {
return nil
}
return self[0]
}
func last() -> Element? {
@funroll
funroll / Podfile-snippet
Created June 22, 2014 04:23
CocoaPods post_install step for changing Build Active Architecture Only from Yes to No.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
@iammerrick
iammerrick / PanGesture.js
Last active August 31, 2018 16:42
Panning Mobile Web
import React from 'react';
import ReactDOM from 'react-dom';
import { getPointRelativeToElement, getDistanceBetweenPoints } from 'utilities/geometry';
const THRESHOLD = 10;
const pointFromTouch = (touch) => ({ x: touch.clientX, y: touch.clientY });
class PanGesture extends React.Component {
constructor() {
@andigu
andigu / TabParallax.js
Last active October 23, 2023 07:34
A react native component featuring parallax scrolling with tabs
import React, {Component} from "react";
import {Animated, Dimensions, Platform, Text, TouchableOpacity, View} from "react-native";
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, TabHeading, Tabs, Title} from "native-base";
import LinearGradient from "react-native-linear-gradient";
const {width: SCREEN_WIDTH} = Dimensions.get("window");
const IMAGE_HEIGHT = 250;
const HEADER_HEIGHT = Platform.OS === "ios" ? 64 : 50;
const SCROLL_HEIGHT = IMAGE_HEIGHT - HEADER_HEIGHT;
const THEME_COLOR = "rgba(85,186,255, 1)";