Skip to content

Instantly share code, notes, and snippets.

@jflynn33
jflynn33 / aws_s3_cp_and_set_acl.markdown
Last active Dec 14, 2016
Amazon AWS S3 Copy with ACL
View aws_s3_cp_and_set_acl.markdown
@jflynn33
jflynn33 / OSXSpacers.markdown
Last active Jan 28, 2017
How to insert spacers between OS X/macOS dock icons
View OSXSpacers.markdown

Courtesy of Life Hacker

Open terminal and paste the following one-liner:

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'; killall Dock

When the Dock restarts, there should be a draggable blank space that you can move anywhere.

@jflynn33
jflynn33 / xcode_7_transport_security_error.md
Last active Sep 29, 2015
FIX: Transport Security has Blocked a cleartext HTTP
View xcode_7_transport_security_error.md

Transport Security has blocked a cleartext HTTP

Full message: Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

I encountered this message first using Xcode 7 (GA) this week after loading a project I had successfully built with Xcode 6.x. Apparently, a new default security restriction is to disallow any non-encrypted HTML (i.e., not SSL/HTTPS) The workaround is fairly simple, albeit risky if not properly addressed (see warning below) - allow non-SSL sources via an entry in your app's info.plist file.

For more info, along with a more elegant and formal approach, see this post (thanks to the OP!) on StackOverflow

Workaround:

@jflynn33
jflynn33 / Sublime_Text_2_Add_Hack_Font.md
Last active Sep 2, 2015
Adding Hack typeface to Sublime Text 2
View Sublime_Text_2_Add_Hack_Font.md

How to install the Hack 2.0 typeface in your Sublime Text 2 editor

Hack 2.0 is a typeface specifically targeting coders - easy-to-read with enhanced glyphs that can help reduce typos (zeros vs. O's, semi- vs. colons, parentheses vs. curly braces, etc.)

Download this (or the latest) Hack 2.0 typeface from https://github.com/chrissimpkins/Hack/releases/download/v2.010/Hack-v2_010-ttf.zip

  • Install all of the font family variations (Regular, RegularOblique, Bold, BoldOblique) by opening them with the Font Book app.

  • Open Sublime Text 2

  • Open Preferences

@jflynn33
jflynn33 / Xcode_Add_Hack_Font.md
Last active Apr 23, 2019
Adding Hack typeface to Xcode
View Xcode_Add_Hack_Font.md

How to install the Hack 2.0 typeface in your Xcode editor

Hack 2.0 is a typeface specifically targeting coders - easy-to-read with enhanced glyphs that can help reduce typos (zeros vs. O's, semi- vs. colons, parentheses vs. curly braces, etc.)

Download this (or the latest) Hack 2.0 typeface from https://github.com/chrissimpkins/Hack/releases/download/v2.010/Hack-v2_010-ttf.zip

  • Install all of the font family variations (Regular, RegularOblique, Bold, BoldOblique) by opening them with the Font Book app.

  • Start Xcode and open Preferences

  • Select the Fonts & Colors tab

@jflynn33
jflynn33 / FB_OG_Template.html
Last active Aug 29, 2015
Open Graph meta tags for HTML rendered in Facebook timeline posts
View FB_OG_Template.html
<!-- should include the OpenGraph xmlns attributes: -->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<!-- should include the following meta tag for Facebook App ID (substitute your own content, without the [ brackets ]): -->
<meta property="fb:app_id" content="[fb app id, if any]" />
<!-- should include the OpenGraph meta tags (substitute your own content, without the [ brackets ]): -->
<meta property="og:url" content="[site URL]" />
<meta property="og:name" content="[name to show, if any]" />
<meta property="og:title" content="[post title, if any]" />