Skip to content

Instantly share code, notes, and snippets.

View bummytime's full-sized avatar
🏡
Mowing the lawn

Matt Bumgardner bummytime

🏡
Mowing the lawn
  • Automattic
  • Grafton, WI, USA, N. America, Earth, Solar System, Milky Way, Local Group, Universe
View GitHub Profile
#!/bin/zsh
# History https://github.com/WordPress/gutenberg/commits/master/packages/block-library/src/index.native.js
# gb-mobile Jetpack blocks: https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/src/jetpack-editor-setup.js
if [[ $# -eq 0 ]] ; then
BRANCH=master
else
BRANCH=$1
fi
@tallguyjenks
tallguyjenks / obsidian.md
Last active November 1, 2021 15:03
My custom theme for the Obsidian Editor

To get a copy of my most up to date custom CSS sign up to my monthly newsletter [[HERE]] Thank you! 🙏🏻️

@danieleggert
danieleggert / GPG and git on macOS.md
Last active May 26, 2024 06:43
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@pyricau
pyricau / OomExceptionHandler.java
Created May 6, 2015 17:18
Dump the heap on OutOfMemoryError crashes in your debug builds.
import android.content.Context;
import android.os.Debug;
import java.io.File;
public class OomExceptionHandler implements Thread.UncaughtExceptionHandler {
private static final String FILENAME = "out-of-memory.hprof";
public static void install(Context context) {
Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
@ignasi
ignasi / resizer-xxhdpi.sh
Last active February 7, 2021 15:29
Android XXHDPI Resizer (Tested on OS X Mavericks)
#!/bin/bash
f=$(pwd)
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi
# fake argv and argc in bash
argc=$#; argv[0]=$0 # argv[0] is a prog name
for foo in $( seq $argc )
do
@albertodebortoli
albertodebortoli / UIView+ADBSubviews.h
Created September 21, 2013 20:18
Find the first view of a given class in the iOS7 subviews hierarchy. iOS backward compatible.
//
// UIView+ADBSubviews.h
// iHarmony
//
// Created by Alberto De Bortoli on 06/08/13.
// Copyright (c) 2013 iHarmony. All rights reserved.
//
#import <UIKit/UIKit.h>
public class AnimatedActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//opening transition animations
overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale);
}
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active May 27, 2024 12:11
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@markd2
markd2 / BlahView.m
Created September 17, 2012 20:07
A simple UIView that draws itself in a color based on its address in memory.
@interface BlahView : UIView
@end
@implementation BlahView
- (void) drawRect: (CGRect) rect {
CGRect bounds = self.bounds;
UIColor *color = [UIColor colorWithRed: (((int)self) & 0xFF) / 255.0