Skip to content

Instantly share code, notes, and snippets.

View teameh's full-sized avatar

Teameh teameh

View GitHub Profile
//
// CustomSpacer.swift
//
// Created by Tieme on 12/06/2024.
//
import SwiftUI
import Combine
struct CustomSpacer: View {
@teameh
teameh / MeshGradientTests.swift
Created June 16, 2024 12:48
Animated Mesh Gradients in SwiftUI
//
// ContentView.swift
// MeshGradientTests
//
// Created by Tieme van Veen on 15/06/2024.
//
import SwiftUI
let allColors: [Color] = [
@teameh
teameh / xctrace-export-leaks.xml
Created May 16, 2023 14:11
xctrace export leaks
<?xml version="1.0"?>
<trace-toc>
<run number="1">
<info>
<target>
<device uuid="3F77F5E4-ECD7-42AB-8E55-3079CB3BBB21" model="Simulated iPhone 14 Pro" name="iPhone 14 Pro" os-version="16.2 (20C52)" platform="iOS Simulator"/>
<process name="PerformanceTestingPOC" pid="89699"/>
</target>
<summary>
@teameh
teameh / step.yml
Last active January 14, 2020 21:25
Post build status to bitbucket server
title: Bitbucket server post build status
summary: |
Post build status to bitbucket server
description: |
Post build status to bitbucket server
website: https://github.com/teameh/bitrise-step-bitbucket-server-post-build-status
source_code_url: https://github.com/teameh/bitrise-step-bitbucket-server-post-build-status
support_url: https://github.com/teameh/bitrise-step-bitbucket-server-post-build-status/issues
published_at: 2020-01-14T22:21:58.87928+01:00
source:
@teameh
teameh / swiftlint.sh
Last active July 4, 2023 03:29
Swiftlint pre-commit script
#!/bin/bash
set -e
if [ "$CI" == true ]; then
echo "CI == true, skipping this script"
exit 0
fi
SWIFT_LINT=./Pods/SwiftLint/swiftlint
@teameh
teameh / PanResponder_Overview.js
Last active October 21, 2023 05:28
React native PanResponder interface overview
this._panResponder = PanResponder.create({
// ----------- NEGOTIATION:
// A view can become the touch responder by implementing the correct negotiation methods.
// Should child views be prevented from becoming responder on first touch?
onStartShouldSetPanResponderCapture: (evt, gestureState) => () => {
console.info('onStartShouldSetPanResponderCapture');
return true;
},
@teameh
teameh / 1-example.com.conf
Last active December 19, 2019 12:57
Silex - Let NGINX handle static files after authentication with PHP
server {
listen 80;
listen [::]:80;
server_name example.com;
root /var/www/project/web;
index index.php;
# catches internal redirects from php with 'X-Accel-Redirect' header
location /private_admin_files {
@teameh
teameh / fetch-example.js
Last active July 5, 2016 14:19
Github Fetch error example
// Changed after code review
// http://codereview.stackexchange.com/questions/133911
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return Promise.resolve(response);
}
return response.json()
.catch(() => {
const error = new Error(response.statusText);
## Custom name registering / multiple services
You can register the service using a name other than the default name `memcache`.
```php
$app->register(new MemcachedServiceProvider('my.custom.name'));
```
The same method can be used to register multiple services on your application.
If you do, make sure to also use different cache prefixes for each service.
```php
@teameh
teameh / gist:6a1a40f12e3515970bc0
Created February 9, 2015 10:31
willSet didSet playground
// Playground - noun: a place where people can play
import UIKit
class Person {
var name: String?
var address: Address? {
willSet(newValue) {
if let newAddress = newValue {