Skip to content

Instantly share code, notes, and snippets.

View eliperkins's full-sized avatar
🍞
Let’s get this bread.

Eli Perkins eliperkins

🍞
Let’s get this bread.
View GitHub Profile
@keith
keith / link.sh
Last active December 22, 2016 13:35
Build to iOS 10 from Xcode 7.3.1
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@dhh
dhh / Basecamp-DDOS.md
Last active August 30, 2023 09:33
Basecamp is under network attack (DDoS)

Basecamp was under network attack

The attack detailed below has stopped (for the time being) and almost all network access for almost all customers have been restored. We're keeping this post and the timeline intact for posterity. Unless the attack resumes, we'll post a complete postmortem within 48 hours (so before Wednesday, March 26 at 11:00am central time).

Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at 8:46 central time, March 24 2014. The goal is to make Basecamp, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.

Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people

@eliperkins
eliperkins / Spacegray.dvtcolortheme
Created January 7, 2014 16:53
Spacegray color theme for Xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.7653 0.699234 0.758969 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 13.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.6431 0.5881 0.637824 1</string>
@jspahrsummers
jspahrsummers / gist:7080228
Last active May 2, 2019 11:56
Advantages and disadvantages to RACCommand under MVVM

MVVM example

For a command that initiates a network request when:

  • The network connection is up (precondition)
  • The network request is not already in progress (enforced serialization)

The lifecycle proceeds as follows:

  1. The view model exposes the command and describes its behavior
[[[NSNotificationCenter.defaultCenter
rac_addObserverForName:NSApplicationDidBecomeActiveNotification object:nil]
takeUntil:self.rac_willDeallocSignal]
subscribeNext:^(NSNotification *notification) {
NSLog(@"got ur note bro: %@", notification);
}];
// some other shit
@lsiv568
lsiv568 / time_slider.coffee
Last active December 18, 2015 01:59
Time Slider AngularJS Directive
'use strict';
angular.module('buzzbandBackstageApp')
.directive('timeSlider', ($window) ->
updateStartTime = (span, value) ->
# set start and end times
sd = new Date(value)
startDate = sd.toLocaleDateString()
startTime = sd.toLocaleTimeString()
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active March 10, 2024 19:23
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>
@tapi
tapi / .gitignore
Last active December 15, 2015 20:49 — forked from adamgit/.gitignore
Adds the AppCode .idea folder
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@briandoll
briandoll / A_toast_to_you.md
Last active March 19, 2022 01:17
Toasts! - scripts to convert images attached to GitHub issues into an animated gif for serious celebratory purposes

To toast:

  • Make sure you have ImageMagick installed (brew install imagemagick)
  • Change line 7 of toast.rb to the repository name you're working with
  • toast!
$ bundle install
$ ./get_token [user] [pass]
$ export GHUSER=[myuser]