Skip to content

Instantly share code, notes, and snippets.

View amine2233's full-sized avatar

Amine Bensalah amine2233

View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 23, 2026 08:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ollieatkinson
ollieatkinson / AnyDiffable.swift
Last active February 12, 2023 10:14
Implementation of Paul Heckel's Diff Algorithm in Swift 3
public protocol Diffable: Hashable {
var primaryKeyValue: String { get }
}
/// A type-erased diffable value.
/// The AnyDiffable type forwards diffing, equality comparisons and hashing operations to an underlying diffing value,
/// hiding its specific underlying type.
///
@alexaubry
alexaubry / Heroku-Vapor-Docker-Tutorial.md
Last active December 26, 2022 12:03
How to run Vapor with Docker in Heroku

How to run Vapor with Docker in Heroku

In this tutorial you'll learn how to run a Vapor server in a Docker container on Heroku.

Recently, Heroku added the ability to run Docker images on their Runtime. You can use this system instead of the traditional buildpack-based system for various reasons, mainly for having more control over the environment your server will run on.

Prerequisites

To complete this tutorial, you'll need:

@mattlawer
mattlawer / gist:3db21a1264afdca0314c7183143438bc
Created September 18, 2016 17:28
DirectoryMonitor - Swift 3
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
`DirectoryMonitor` is used to monitor the contents of the provided directory by using a GCD dispatch source.
*/
import Foundation
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active July 14, 2026 17:03
tmux Cheat Sheet
@adison
adison / outlineview.m
Last active January 14, 2022 06:14
make source list style nsoutlineview programmatically
NSScrollView* container = [[NSScrollView alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
container.hasVerticalScroller = YES;
container.hasHorizontalScroller = YES;
container.wantsLayer = YES;
container.identifier = [@(LOGVIEW_OFFSET + i) stringValue];
NSClipView* clipview = [[NSClipView alloc] init];
clipview.autoresizesSubviews = YES;
clipview.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
@hsandt
hsandt / buildandrun-ios.sh
Last active August 25, 2024 20:07
Build and run on a connected iOS device from command-line (even if Unity Editor does not support auto-run for current Xcode version)
# Platform: OS X
#
# Role: pull last repository changes, then build and run on a connected iOS device
#
# Usage: ./buildandrun-ios.sh [version] [--run-only]
#
# Parameters:
# version version number (e.g. "v0.2", "v4rc3", etc.) for your Unity build name
# --run-only set this if the Unity project was already build and you don't want to rebuild it
#
class NotificationHelper {
let notificationCenter: NSNotificationCenter
var observers: [AnyObject] = []
init(notificationCenter: NSNotificationCenter = NSNotificationCenter.defaultCenter()) {
self.notificationCenter = notificationCenter
}
deinit {
observers.forEach { self.notificationCenter.removeObserver($0) }
//
// Created by Eric Firestone on 3/22/16.
// Copyright © 2016 Square, Inc. All rights reserved.
// Released under the Apache v2 License.
//
// Adapted from https://gist.github.com/blakemerryman/76312e1cbf8aec248167
import Foundation
@tkersey
tkersey / .2026.md
Last active July 21, 2026 19:37
For future reference but maybe not.

Quick access

2026

July

  • Type Mermaid diagram source below and it is rendered as terminal-style Unicode box-drawing art — entirely in your browser, by the actual Rust renderer from xai-org/grok-build (the Grok CLI) compiled to WebAssembly. Flowcharts, sequence, state, class and ER diagrams are supported; other diagram types fall back to a framed source listing. Rust source, license and build script: grok-mermaid/.

> The software engineering methodology developed by TigerBeetle to produce safer, faster software in less time.