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
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;
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
View .aliases
alias gulp='gulp $1 --require coffee-script/register'
View compiled.css
.cursor.auto {
cursor: auto !important;
}
.cursor.crosshair {
cursor: crosshair !important;
}
.cursor.default {
cursor: default !important;
View example.sass
.profile-pic {
float: left;
width: 250px;
@include respond-to(xs) {
width: 100%;
}
@include respond-to(sm) {
width: 125px;
}
View Slim.php
<?php
class Mustache extends \Slim\View
{
public function render($template)
{
$mustache = new \Mustache_Engine(
array(
'loader' => new Mustache_Loader_FilesystemLoader(__DIR__.'/'),
// ...
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."'";
}