Skip to content

Instantly share code, notes, and snippets.

View saiday's full-sized avatar
:shipit:
su su su

Saiday saiday

:shipit:
su su su
View GitHub Profile
//
// SAWKWebView.swift
//
// Created by Costantino Pistagna on 24/01/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
import UIKit
import WebKit
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active November 6, 2024 15:21
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@NSEGeorge
NSEGeorge / LaunchTimeMeasurer.swift
Created November 3, 2018 14:21
Swift implementation of function for measuring application launch time. Call it from start or end didFinishLaunchingWithOptions.
import UIKit
class LaunchTimeMeasurer {
private let pid = ProcessInfo().processIdentifier
private var currentTime = timeval(tv_sec: 0, tv_usec: 0)
private var bootTime = timeval()
private var size = MemoryLayout<kinfo_proc>.stride
private var mib: [Int32]
init() {
@thebrecht
thebrecht / EmailMixer.md
Last active March 1, 2018 09:18
看到北港武德宮動態產生 email 而來的 email 混淆字串產生器

偶然的機會,看到北港武德宮的網站,相當精美,一改過去對宮廟網站的印象。

照例,要打開原始碼來學習一下,馬上發現一串不太尋常的 JS

<script type="text/javascript">
	//<![CDATA[
	var l=new Array();
	l[0] = '>';
	l[1] = 'a';
@tomaszpolanski
tomaszpolanski / Movie.kt
Last active August 28, 2024 10:14
Parcelize testing
import android.annotation.SuppressLint
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
@SuppressLint("ParcelCreator") // IntelliJ Issue https://youtrack.jetbrains.com/issue/KT-19300
@Parcelize
data class Movie(val title: String) : Parcelable
@nicklockwood
nicklockwood / UnicodeScalarView.swift
Last active May 30, 2021 13:12
UnicodeScalarView.swift
// This is a really simple drop-in replacement for String.UnicodeScalarView
// As of Swift 3.2, String.UnicodeScalarView no longer supports slice operations, and
// String.UnicodeScalarView.Subsequence is ~5x slower
//
// Only a small subset of methods are implemented, specifically the ones useful for
// implementing a parser or lexer that consumes a string by repeatedly calling popFirst()
//
// I've benchmarked popFirst() as ~7x faster than String.UnicodeScalarView.Subsequence in Swift 3.2 and 4.0
// The performance is close to that of String.UnicodeScalarView in Swift 3.1, but may be slightly worse in some use cases
@terhechte
terhechte / pattern-examples.swift
Created August 22, 2015 15:29
Swift pattern examples for the swift, for, and guard keywords
import Foundation
// 1. Wildcard Pattern
func wildcard(a: String?) -> Bool {
guard case _? = a else { return false }
for case _? in [a] {
return true
}
@eurycea
eurycea / Something.java
Last active February 8, 2021 06:31
Android Build Config Field from command line
...
if(BuildConfig.DEVELOPER_MODE){
doDeveloperModeThing();
}
...
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@pusewicz
pusewicz / mov2gif.rb
Last active December 29, 2015 01:09
Convert you QuickTime recorded screencast in the MOV and turn it into an animated GIF
#!/usr/bin/env ruby
=begin
DEPENDENCIES:
$ brew install ffmpeg
$ brew install imagemagick
=end
require 'optparse'
require 'fileutils'