Skip to content

Instantly share code, notes, and snippets.

View indirect's full-sized avatar

André Arko indirect

View GitHub Profile
@chockenberry
chockenberry / AttributedString.swift
Created June 1, 2022 21:08
A playground that shows how to use Swift's AttributedString with Markdown
import UIKit
import Foundation
// NOTE: This playground shows how to use Swift's AttributedString with Markdown.
//
// This code was used to display Markdown content in the Tot iOS Widget <https://tot.rocks>
// MARK: - Helpful Links
// NOTE: The following links helped me figure this stuff out.
@mtucker
mtucker / creating_a_date_dimension_table_in_postgresql.sql
Last active December 14, 2022 14:04 — forked from duffn/creating_a_date_dimension_table_in_postgresql.sql
Creating a date dimension table in PostgreSQL
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,
@patrickfuller
patrickfuller / alias_dns.py
Last active August 4, 2024 05:00
Enables local DNS resolution of Unifi aliases
"""
When run in cron, automatically adds compliant alias names to local DNS.
Use at your own risk.
Patrick Fuller, 25 June 17
"""
import re
import paramiko
import pymongo
@romainl
romainl / colorscheme-override.md
Last active October 7, 2024 16:23
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
@toch
toch / docset_for_gem.sh
Created April 26, 2016 15:42
a Bash script to generate docset for Zeal from a group of gems
#!/bin/bash
# rubygem is required
# yard is required: gem install yard
# doc_to_dash is required: gem install doc_to_dash
GEM_NAME_PREFIX=$1
DOCSET_DIR=$2
TMP_DIR=$(mktemp -d)
@jamtur01
jamtur01 / ladder.md
Last active November 4, 2024 08:05
Kickstarter Engineering Ladder
@dgoodlad
dgoodlad / Gemfile
Created October 21, 2014 22:38
Boxen script/sync
group :development do
# Replace the old aws gem with this one (or newer):
gem "aws-sdk-core", "2.0.0.rc15"
end
@tmm1
tmm1 / sample.gif
Last active December 11, 2020 07:40
View Profiler
sample.gif
#!/bin/bash
set -ex
bundle install --standalone
digest=$(md5 -q Gemfile)
cmd="raise \"Gemfile changed\" if %x[md5 -q Gemfile].chomp != \"${digest}\""
echo $cmd > bundle/bundler/setup.rb.new
cat bundle/bundler/setup.rb >> bundle/bundler/setup.rb.new
@anikalindtner
anikalindtner / gist:9524950
Last active March 1, 2023 11:52
Workshops/Mailinglists/Lists