Skip to content

Instantly share code, notes, and snippets.

View ionel71089's full-sized avatar
🍎
Eating an apple.

Ionel Lescai ionel71089

🍎
Eating an apple.
View GitHub Profile
@chrislavender
chrislavender / gist:cad26500c9655627544f
Last active April 19, 2024 15:28
HTTP Live Streaming Tutorial

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

@natecook1000
natecook1000 / NSTimer+Closure.swift
Last active January 6, 2024 07:23
Scheduled NSTimer with a Swift closure
extension NSTimer {
/**
Creates and schedules a one-time `NSTimer` instance.
- Parameters:
- delay: The delay before execution.
- handler: A closure to execute after `delay`.
- Returns: The newly-created `NSTimer` instance.
*/
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@ksmandersen
ksmandersen / gist:4d3530eeacd9c41786e5
Created August 4, 2014 09:24
Workaround for: Generic Array DataSource
public class ArrayDataSource<CellType: UIView, ItemType> {
private var items: [ItemType]
private var cellReuseIdentifier: String
private var configureClosure: (CellType, ItemType) -> Void
private var proxy: DataSourceProxy!
private unowned var view: UIView
public init(view: UIView, items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) {
self.items = items
self.cellReuseIdentifier = cellReuseIdentifier
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active June 8, 2024 10:07
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@tobico
tobico / betterjira.css
Last active July 23, 2019 06:33
CSS override to make JIRA agile boards less annoying
/*
* Makes JIRA agile boards less annoying
*
* - removes the issue number link, because nobody cares, and makes the whole card clickable
* - removes the ugly icons from the left side of the card
* - reduces card size to 2 lines to fit more cards on screen
* - increases line height on card description to make it more readable
* - colour in the whole card instead of just the edge
* - bigger avatars on cards, and more close up
* - larger preview pane
@rgm
rgm / stamp-icon.rb
Last active September 11, 2023 12:40
Add the current version and build number on your iOS app icon
#!/usr/bin/env ruby
# Requires ImageMagick: `brew install imagemagick`
# Requires version.sh from https://gist.github.com/osteslag/1089407
#
# Set RGM_STAMP_VERSION_ON_ICONS=1 in your build settings to enable/disable
# stamping on Debug/Relase configurations.
#
# Make base unstamped versions Icon.base.png, &c. in the source tree. The
# script will make stamped versions Icon.png, &c. It relies on Xcode to copy
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

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