Skip to content

Instantly share code, notes, and snippets.

View insanj's full-sized avatar
🎉
insanj.com

Julian Weiss insanj

🎉
insanj.com
View GitHub Profile
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@tom-go
tom-go / install_theos.sh
Created August 13, 2012 16:15
Theos install script
#!/bin/bash
export THEOS=/opt/theos
# clone theos.git
cd /opt
git clone git://github.com/DHowett/theos.git
# clone iphoneheaders.git
cd $THEOS
mv include include.bak
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Dinnerbone
Dinnerbone / gist:5662824
Created May 28, 2013 13:38
As an essential step towards the Minecraft modding API, and also for sanity's sake in our own code, we're removing Texture Packs and replacing them with a new Resource Pack system. Ultimately, every mod/plugin will be its own resource pack, vanilla will be a resource pack by itself, and users will be able to apply multiple resource packs at once…
{
"//comment": "All metainfo files will be ORIGINAL_FILE.mcmeta. For example, textures/blocks/portal.png.mcmeta. The format is, of course, JSON.",
"animation": {
"//comment": "This block will be required for animated textures. It can be an empty block, but it will be needed to detect an animation.",
"frames": [
1,
{"index": 2, "time": 4},
3,
4
],
@digitaljhelms
digitaljhelms / disableinstantwatch.user.js
Last active June 28, 2022 00:51
Disable Netflix Instant Watch Links
// ==UserScript==
// @name Disable Netflix Instant Watch Links
// @namespace https://gist.github.com/6349351
// @description Click the cover image, go the video detail page, simple...
// @version 1.1
// @author Jeremy Helms <digitaljhelms@gmail.com>
// @include http://www.netflix.com/*
// @exclude http://www.netflix.com/WiPlayer/*
// ==/UserScript==
@remram44
remram44 / http_directory.py
Last active September 16, 2022 00:14
Recursively download a directory with Python
from HTMLParser import HTMLParser
import urllib2
import os
import re
re_url = re.compile(r'^(([a-zA-Z_-]+)://([^/]+))(/.*)?$')
def resolve_link(link, url):
m = re_url.match(link)
@conradev
conradev / CKBlurDetection.h
Created January 27, 2014 19:28
UIKit Blur Detection
//
// CKBlurDetection.h
//
// Created by Conrad Kramer on 1/23/14.
// Copyright (c) 2014 Kramer Software Productions, LLC. All rights reserved.
//
extern BOOL CKBlurEnabled();
@b3ll
b3ll / UIBlurView.m
Created March 24, 2014 22:12
How to iOS 7
// Basically what every single developer has done to update their app for iOS 7 :P
@interface UIBlurView : UIToolbar
@end
@implementation UIBlurView
@end
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
%hook SpringBoard
-(BOOL)homeScreenSupportsRotation {
return YES;
}
-(BOOL)homeScreenRotationStyleWantsUIKitRotation {
return YES;
}