Skip to content

Instantly share code, notes, and snippets.


Ericment EricMentele

View GitHub Profile
View Simple Scrolling UIStackView
// SimpleScrollingStack.swift
// A super-simple demo of a scrolling UIStackView in iOS 9
// Created by Paul Hudson on 10/06/2015.
// Learn Swift at
// @twostraws
import UIKit
rjchatfield / transducers.swift
Last active Jan 13, 2019
Transducers & Reducers in Swift 2
View transducers.swift
//-- This is an introduction to Transducers in Swift, inspired by
// Talk:
// Code:
// Updated with Swift 2
* Define a few test methods
func append <A> (xs: [A], x: A) -> [A] { return xs + [x] }
norio-nomura / AVPlayerLayer.swift
Last active Jan 5, 2016
View AVPlayerLayer.swift
// Require "Run in Full Simulator" in Playground Settings.
// On first execution, iOS Simulator will show request authorization for Photo Library.
// Only a video without audio track can be played.
import UIKit
import AVFoundation
import Photos
import XCPlayground
class PLayerView: UIView {
gregorynicholas / google-apps-script-github-burndown.js
Created Feb 14, 2014
google apps script to create a github issues burndown chart
View google-apps-script-github-burndown.js
* Heads to github fetches milestone info, and adds rows to spreadsheet
function updateBugCounts() {
var resp = UrlFetchApp.fetch("");
var jsonStr = resp.getContentText();
var milestones = Utilities.jsonParse(jsonStr);
var dataSs = SpreadsheetApp.openById("YYY");
var sheet = dataSs.getSheetByName('Raw Data');
olivierlacan / launch_sublime_from_terminal.markdown
Created Sep 5, 2011
Launch Sublime Text 2 from the Mac OS X Terminal
View launch_sublime_from_terminal.markdown

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\

You can find more (official) details about subl here:


You can’t perform that action at this time.