Skip to content

Instantly share code, notes, and snippets.

Mark Schisler markshiz

Block or report user

Report or block markshiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am markshiz on github.
  • I am markshiz (https://keybase.io/markshiz) on keybase.
  • I have a public key ASCH_7_0dtevFVMv6Yg16FbN4yYxOIRXAZ7QKhUzdktQ0go

To claim this, I am signing this object:

@markshiz
markshiz / CacheTest.java
Last active May 5, 2018 — forked from swankjesse/RetrofitCachingExample.java
Demonstrate HTTP caching with OkHttp 2.5.0 and Retrofit 1.9.0.
View CacheTest.java
/*
* Copyright (C) 2013 Square, Inc.
*
* 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
@markshiz
markshiz / gist:6a3444a497ffe6fa90a0
Created Jun 27, 2014
Rails locale with HTTP_ACCEPT_LANGUAGE
View gist:6a3444a497ffe6fa90a0
require 'i18n'
module Rack
class Locale
def initialize(app)
@app = app
end
def call(env)
old_locale = I18n.locale
View JellyBeanSpanFixTextView.java
import android.content.Context;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.TextView;
import com.github.jobs.BuildConfig;
import java.util.ArrayList;
import java.util.List;
@markshiz
markshiz / gist:4410356
Last active Dec 10, 2015
A deep equality comparison for any NSObject
View gist:4410356
- (BOOL)isEqual:(id)object {
if ( [object isMemberOfClass:self.class] ) {
unsigned int count;
Ivar* ivars = class_copyIvarList(self.class, &count);
for(unsigned int i = 0; i < count; ++i) {
NSObject* lhs = object_getIvar(self, ivars[i]);
NSObject* rhs = object_getIvar(object, ivars[i]);
if ( [lhs isKindOfClass:NSObject.class] && [rhs isKindOfClass:NSObject.class] ) {
if ( ![lhs isEqual:rhs] ) {
free(ivars);
You can’t perform that action at this time.