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:
Jekyll is a great CMS for developers and GitHub Pages is a great host to store your Jekyll sites. There is just one problem, GitHub runs Jekyll in safe mode, which means you can't use plugins. One thing you can do is building the Jekyll website locally and then push to GitHub.
Alexandre Rademaker found a solution to do this easially, which is quite usefull: "GitHub Pages and Jekyll plugins" After reading this I thought, that can be done easier!
Git provides a way to have aliases of bash commands. You can do this by adding items to the alias
key of your configuration. For this, you can add this locally by adding this lines to your %PROJECT_ROOT%/.git/config
file:
require 'twitter' | |
require "json" | |
USERNAME = 'YOUR_TWITTER_USER_NAME' | |
ARCHIVE_PATH = 'archive/data/js/tweets' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = 'TWITTER_APP_API_KEY' | |
config.consumer_secret = 'TWITTER_APP_API_SECRET' | |
config.access_token = 'TWITTER_APP_ACCESS_TOKEN' |
import UIKit | |
import QuartzCore | |
class ViewController: UIViewController { | |
var eView: UIVisualEffectView? | |
@IBAction func blurOut(sender: UIVisualEffectView) { | |
//eView?.removeFromSuperview() | |
var removeTransition = CATransition() |
const arr = [["foo", "bar"], ["hello", "world"]]; | |
// Create object from array of tuples | |
const obj = {}; arr.forEach(el => obj[el[0]] = el[1]); | |
const map = new Map(arr); | |
// Get object size | |
const objSize = Object.keys(obj).length; | |
const mapSize = map.size; |
// UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that | |
// does not support `nomodule` is probably not being used anywhere. The code below is left | |
// for posterity. | |
/** | |
* Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
* load <script nomodule> anyway. This snippet solve this problem, but only for script | |
* tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
* | |
* Again: this will **not** prevent inline script, e.g.: |
import Foundation | |
class Channel<Message> { | |
private enum State { | |
case empty | |
case readyToReceive | |
case full(Message) | |
} | |
private let condition: NSCondition |