This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/* | |
Distributed under The MIT License: | |
http://opensource.org/licenses/mit-license.php | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
/** | |
* The contract of this method is that the method will check if unsafeThing is nil before using it. | |
* This contract is not encoded in the method signature and is not compiler-enforced! | |
*/ | |
func safelyHandlesIUO(unsafeThing: String!) { | |
println("This isn't an optional. We can use it directly but may find nil and crash: \(unsafeThing)") | |
if let safeThing = unsafeThing { | |
println("String is \(count(safeThing)) length") | |
} else { | |
println("Woah, we would have crashed if we passed it to count!") |
extension CollectionType where Index: Comparable { | |
subscript (safe index: Index) -> Generator.Element? { | |
guard startIndex <= index && index < endIndex else { | |
return nil | |
} | |
return self[index] | |
} | |
} |
// enable strict mode, we use this in every JS file | |
// for more info see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode | |
'use strict'; | |
// declare our module and it's dependencies (empty array because there are no deps) | |
angular.module('example', []); |
// ------------------------------------- | |
// Swift Integer Quick Guide | |
// ------------------------------------- | |
// Created by Keith Harrison http://useyourloaf.com | |
// Copyright (c) 2017 Keith Harrison. All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// |