Skip to content

Instantly share code, notes, and snippets.

View snowtema's full-sized avatar

Tema Snow snowtema

  • Russia, St. Petersburg
View GitHub Profile
@saniales
saniales / A-Transferwise-Slack-Integration-with-Cloudflare-Workers.md
Last active March 4, 2022 13:24
A TransferWise integration with Slack Webhooks using Cloudflare Workers

TransferWise webhook integration with Slack notifications using Cloudflare Workers

Greetings from the Tryvium Team,

Here is how to integrate a Transferwise webhook with Slack notifications. We have chosen to use cloudflare workers as a perfect case study for serverless applications using cloudflare.

Setting things up

@TiborUdvari
TiborUdvari / ExcemptFromEncryption.cs
Last active April 23, 2024 16:22
Marks ITSAppUsesNonExemptEncryption in Unity generated Info.plist file to false. Doing this no longer requires manually marking the app as not using non-exempt encryption in iTunes Connect for Testflight beta testing.
using UnityEngine;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class ExcemptFromEncryption : IPostprocessBuildWithReport // Will execute after XCode project is built
{
public int callbackOrder { get { return 0; } }
@tomisacat
tomisacat / CountDownTimer.swift
Last active November 5, 2021 12:46
A simple count down timer using RxSwift
import RxSwift
func count(from: Int, to: Int, quickStart: Bool) -> Observable<Int> {
return Observable<Int>
.timer(quickStart ? 0 : 1, period: 1, scheduler: MainScheduler.instance)
.take(from - to + 1)
.map { from - $0 }
}
@buechner
buechner / UIImageView+fixVectorTemplate.swift
Created August 2, 2016 10:01
Fixing a bug in XCode, where a vector image set as template can not be tinted in Interface Builder: http://openradar.appspot.com/18448072
import UIKit
// fixing Bug in XCode
// http://openradar.appspot.com/18448072
extension UIImageView {
override public func awakeFromNib() {
super.awakeFromNib()
self.tintColorDidChange()
}
}
@paulochf
paulochf / urldecode.sql
Created March 11, 2016 19:10
URL decode for MySQL
-- Found at http://stackoverflow.com/a/17922821/597349
DROP TABLE IF EXISTS urlcodemap;
CREATE TABLE `urlcodemap` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`encoded` VARCHAR(128) NOT NULL,
`decoded` VARCHAR(128) NOT NULL,
UNIQUE KEY urlcodemapUIdx1(encoded),
PRIMARY KEY (`id`)
@JeOam
JeOam / Animation.md
Last active July 11, 2024 03:30
iOS Core Animation: Advanced Techniques, Part 1: The Layer Beneath

Author: https://www.cyanhall.com/

1. The Layer Tree

Core Animation's original name is Layer Kit

Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.

In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer. The only major feature of UIView that isn’t handled by CALayer is user interaction.

There are four hierarchies, each performing a different role: