Skip to content

Instantly share code, notes, and snippets.

Avatar

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 www.hackingwithswift.com
// @twostraws
//
import UIKit
@rjchatfield
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: https://www.youtube.com/watch?v=estNbh2TF3E
// Code: https://github.com/mbrandonw/learn-transducers-playground
// Updated with Swift 2
/**
* Define a few test methods
*/
/// REDUCER
func append <A> (xs: [A], x: A) -> [A] { return xs + [x] }
@norio-nomura
norio-nomura / AVPlayerLayer.swift
Last active Jan 5, 2016
PlaygroundでAVPlayerLayer
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
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("https://api.github.com/repos/DramaFever/www/milestones?access_token=XXX");
var jsonStr = resp.getContentText();
var milestones = Utilities.jsonParse(jsonStr);
var dataSs = SpreadsheetApp.openById("YYY");
var sheet = dataSs.getSheetByName('Raw Data');
@olivierlacan
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\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

You can’t perform that action at this time.