Skip to content

Instantly share code, notes, and snippets.

Ryan Brodie brod-ie

Block or report user

Report or block brod-ie

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
@brod-ie
brod-ie / fixTheDock.sh
Created Feb 8, 2016
Stop the maddening OS X dock's autohide delay
View fixTheDock.sh
#!/bin/bash
defaults write com.apple.dock autohide-time-modifier -int 0
defaults write com.apple.Dock autohide-delay -float 0
killall Dock
@brod-ie
brod-ie / PulsingCTA.html
Created Jan 12, 2016
Pulsing Call To Action Tap Target
View PulsingCTA.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
body, html {
height: 100%;
background: #fff;
}
View HiddenSFViewController.m
#import "SafariServices/SafariServices.h"
// Init SFViewController with webpage that'll use the
// app's URL scheme to send result back to app
NSURL *url = [NSURL URLWithString:@"http://api.app.com/determine-auth-state"];
SFSafariViewController *sfvc = [[SFSafariViewController alloc] initWithURL:url];
// Configure to be hidden over existing VC
sfvc.view.hidden = YES;
sfvc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
@brod-ie
brod-ie / .osx
Created Apr 8, 2014
OS X: Save to disk (not to iCloud) by default
View .osx
#!/bin/bash
# Ask for the administrator password upfront
sudo -v
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Kill finder
killall "Finder" > /dev/null 2>&1
@brod-ie
brod-ie / .aliases
Created Feb 10, 2014
Alias for easy `gulpfile.coffee` use with GulpJS
View .aliases
alias gulp='gulp $1 --require coffee-script/register'
@brod-ie
brod-ie / compiled.css
Last active Aug 22, 2019
CSS cursor property helper
View compiled.css
.cursor.auto {
cursor: auto !important;
}
.cursor.crosshair {
cursor: crosshair !important;
}
.cursor.default {
cursor: default !important;
@brod-ie
brod-ie / example.sass
Created Aug 19, 2013
respond-to() SASS mixin for Bootstrap 3 grid system.
View example.sass
.profile-pic {
float: left;
width: 250px;
@include respond-to(xs) {
width: 100%;
}
@include respond-to(sm) {
width: 125px;
}
@brod-ie
brod-ie / Slim.php
Last active Dec 20, 2015
`\Slim\View` class extension for use with the Mustache templating engine.
View Slim.php
<?php
class Mustache extends \Slim\View
{
public function render($template)
{
$mustache = new \Mustache_Engine(
array(
'loader' => new Mustache_Loader_FilesystemLoader(__DIR__.'/'),
// ...
@brod-ie
brod-ie / Asynchronous PHP cURL
Last active Dec 20, 2015
This is the best method I've found for single asynchronous cURL's in PHP (great for calling external API's once your own has finished handling the request).
View Asynchronous PHP cURL
function acURL($url, $fields = array(), $method = 'POST')
{
# Set method
$cmd = "curl -X ".$method;
# Build fields
foreach ($fields as $key => $value) {
$cmd .= " -F '".$key."'='".$value."'";
}
You can’t perform that action at this time.