Skip to content

Instantly share code, notes, and snippets.

View jlott1's full-sized avatar

Jonathan Lott jlott1

View GitHub Profile
@serkanyersen
serkanyersen / get-annotations.js
Created April 25, 2014 00:42
reads all the annotations from google developers youtube channel and extracts goo.gl links
// 1. load up youtube.com
// 2. open console and run this code
var jq = document.createElement('script');
jq.src = "https://code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// After that code has run, copy paste the following code and check results in console.
// Don't forget to add your own API key there
//
// 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>
@ericallam
ericallam / AppDelegate.m
Created May 22, 2014 14:49
Interactive Animated Transition Example
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
@andyshep
andyshep / PASHideDetailAnimator.m
Created June 3, 2014 22:03
A slide-and-zoom animation using collections views
#import <Foundation/Foundation.h>
#import "PASConstants.h"
#import "PASViewController.h"
@interface PASHideDetailAnimator : NSObject <UIViewControllerAnimatedTransitioning>
@end
@implementation PASHideDetailAnimator
@watert
watert / UITableView.swift
Last active July 21, 2017 15:10
UITableView example in iOS Playground with XCode 6 beta
// Playground - noun: a place where people can play
import UIKit
class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource
{
var tableView: UITableView!
var items: NSMutableArray!
override func viewDidLoad() {
super.viewDidLoad()
@keithyipkw
keithyipkw / symbolicatecrash.patch
Last active October 6, 2020 10:05
A dirty fix for crash log symbolication in Xcode
# This patch will force symbolicatecrash to use dSym in atos instead of using release build executables.
#
# After setting the Xcode archive folder to one that outside Library (hidden), Spotlight will find the archives but Xcode still cannot symbolicate crash logs using the archives. If you find some similar errors in the STDERR from symbolicatecrash using the following command, this patch will help
# DEVELOPER_DIR=`xcode-select -print-path` /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash -v -o <symbolicated.crash> <input.crash> 2>v.log
#
# 1 binary images were found.
# Running /Applications/Xcode.app/Contents/Developer/usr/bin/atos -arch armv7 -l 0x82000 -o '<app name>.xcarchive/Products/Applications/<app name>.app/<app name>' <some addresses> |
# ## Warning: Unable to symbolicate from required binary: '<app name>.xcarchive/Products/Applications/<app name>.app/<app name>'
#
# To apply the patch
@dgp
dgp / youtube api video category id list
Created June 11, 2015 05:57
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@jlott1
jlott1 / UIView+FindUIViewController.h
Created June 30, 2015 16:17
UIView Category for locating the UIViewController container for a UIView AND also getting the property name for a UIView....VERY VERY Useful
//
// UIView+FindUIViewController.h
//
// Created by Jonathan Lott on 6/30/15.
// Copyright (c) 2015 A Lott Of Ideas. All rights reserved.
//
@interface ClassProperty : NSObject
@property (nonatomic, strong) NSString* name;
@property (nonatomic, strong) NSString* type;
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active May 30, 2024 06:59
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@fasiha
fasiha / overlapadd2.py
Last active March 31, 2023 19:49
Python/Numpy overlap-add method of fast 2D convolution. Public domain.
import numpy as np
from numpy.fft import fft2, ifft2
def overlapadd2(Amat, Hmat, L=None, Nfft=None, y=None, verbose=False):
"""
Fast two-dimensional linear convolution via the overlap-add method.
The overlap-add method is well-suited to convolving a very large array,
`Amat`, with a much smaller filter array, `Hmat` by breaking the large