Skip to content

Instantly share code, notes, and snippets.

View tmspzz's full-sized avatar

Tommaso Piazza tmspzz

View GitHub Profile
@jianpx
jianpx / wwdc2014-videos-and-pdf
Created June 7, 2014 13:42
wwdc 2014 videos and pdf download links, including HD/SD version.
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_intermediate_swift.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_advanced_graphics_and_animation_performance.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2
@staltz
staltz / introrx.md
Last active July 6, 2024 08:47
The introduction to Reactive Programming you've been missing
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active June 17, 2024 06:08
The best FRP iOS resources.

Videos

@JadenGeller
JadenGeller / AttributedStringBuilder.swift
Last active March 26, 2022 03:24
Interpolated Attributed String Builder
// Example
var brown: AttributedStringSegment = "brown"
brown.foregroundColor = UIColor.brownColor()
brown.expansion = 1.1
var lazy: AttributedStringSegment = "lazy"
lazy.strikethroughStyle = NSUnderlineStyle.StyleDouble
lazy.strikethroughColor = UIColor.redColor()
@rsattar
rsattar / LKImageView.m
Last active January 22, 2016 23:11
UIImageView which constraints its own height based on its layouted width
- (void) setImage:(UIImage *)image
{
[super setImage:image];
if (self.lk_heightConstrainedToAspectWidth && self.image) {
CGFloat imageAspectRatio = self.image.size.height / self.image.size.width;
// If we haven't constrained ourself, or the constraint needs updating
if (!self.aspectRatioHeightConstraint || self.aspectRatioHeightConstraint.multiplier != imageAspectRatio) {
[self setNeedsUpdateConstraints];
}
@mmorris
mmorris / wwdc_2012_urls.txt
Created July 7, 2016 13:41
WWDC 2012 HD video URL list
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_307__building_great_newsstand_apps.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_311__building_and_distributing_custom_b2b_apps_for_ios.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_304__events_and_reminders_in_event_kit.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_300__getting_around_using_map_kit.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_306__integrating_with_facebook_twitter_and_sina_weibo.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_301__introducing_passbook_part_1.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_309__introducing_passbook_part_2.mov
https://developer.apple.com/devcenter/download.action?path=/videos/wwdc_2012__hd/session_3
@AhsanAyaz
AhsanAyaz / angular-travis-ci.yml
Last active January 3, 2020 00:20
Sample TravisCI Yaml file for Angular Project
language: node_js
node_js:
- "7"
sudo: true
dist: trusty
branches:
only:
- master
@bessarabov
bessarabov / gist:674ea13c77fc8128f24b5e3f53b7f094
Last active March 27, 2024 07:46
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
@jaspervdj
jaspervdj / readprec.hs
Created December 6, 2019 11:56
Parser for readPrec
-- Quick example of how to "properly" use readPrec with a "real" parser
import Data.Char (isDigit, toUpper)
import qualified Text.ParserCombinators.ReadP as P
import qualified Text.Read as R
data WirePath = WirePath {d :: Char, a :: Int} deriving (Show)
instance R.Read WirePath where
readPrec = R.readP_to_Prec $ const $ do
c <- P.get