Skip to content

Instantly share code, notes, and snippets.

@tZilTM
tZilTM / sharer-urls.md
Created February 2, 2020 11:50
Sharer (share) URLs (links) for sharing on LinkedIn, Twitter, Pinterest, Reddit and Facebook (2020-02-02)
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@josh-padnick
josh-padnick / fish-agent.sh
Last active May 13, 2024 22:46
Run ssh-agent via fish shell
#!/bin/bash
#
# Convert ssh-agent output to fish shell
#
eval "$(ssh-agent)" >/dev/null
echo "set SSH_AUTH_SOCK \"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK"
echo "set SSH_AGENT_PID \"$SSH_AGENT_PID\"; export SSH_AGENT_PID"
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))
@elijahc
elijahc / jupyter-hub-setup.md
Created November 8, 2017 02:56
Setting up Jupyterhub with multiple virtualenv kernels managed with pyenv
@nathandaly
nathandaly / BaseResource.php
Last active May 13, 2024 22:35
Tenancy for Laravel & Filament V3 (Tenant per database)
<?php
/**
* Below is an the extended Filament resource your tenant panel resources
* will have to extend so that the queries are scoped properly.
*/
namespace App\Filament;
use Filament\Resources\Resource;
@chrisdone
chrisdone / Printf.idr
Last active May 13, 2024 22:34
Type-safe dependently-typed printf in Idris
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
@Joao-Peterson
Joao-Peterson / gmk67-manual.md
Last active May 13, 2024 22:34
GMK67 manual (English)
@JustinFincher
JustinFincher / Table.swift
Created July 28, 2023 02:55
Recursive Outline Table
import SwiftUI
struct TestModel: Identifiable {
let id = UUID()
var children: [TestModel]? {
(0..<5).map { _ in
TestModel()
}
}
}