Skip to content

Instantly share code, notes, and snippets.

View iversond's full-sized avatar

Dan Iverson iversond

View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@steipete
steipete / PSPDFUIKitMainThreadGuard.m
Last active March 10, 2024 19:23
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@geerlingguy
geerlingguy / minecraft.yml
Created September 24, 2020 18:01
Minecraft installation on Kubernetes via Ansible and Helm
# Minecraft Server deployment for Kubernetes clusters via Ansible's Helm module.
#
# The Helm module is part of the Kubernetes collection. Install it with:
#
# ansible-galaxy collection install community.kubernetes
#
# Then run the playbook:
#
# ansible-playbook main.yml
#
@tslater2006
tslater2006 / CodePointUTF8.cs
Created March 31, 2023 14:41
Converts from Unicode codepoint to UTF 8 and vice versa. Courtesy of GPT-4
using System.Text;
static byte[] UnicodeCodepointToUtf8(int codepoint)
{
if (codepoint >= 0 && codepoint <= 127)
{
return new byte[] { (byte)codepoint };
}
else if (codepoint >= 128 && codepoint <= 2047)
{
@joejag
joejag / profile.ps1
Last active October 24, 2022 03:46
Powershell profile
# Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
# Install-Module git-aliases -Scope CurrentUser -AllowClobber
# Install-Module PSReadLine -Scope CurrentUser -AllowPrerelease -Force
# Install-Module nvm -Scope CurrentUser
# Copy of the robby russell theme
function Prompt {
if ($?) {
Write-Host '➜' -NoNewline -ForegroundColor Green
}
@mkubenka
mkubenka / Vagrantfile
Last active October 12, 2022 05:34
Windows on AWS with Vagrant
require 'inifile'
require 'date'
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.guest = "windows"
config.vm.boot_timeout = 600
config.vm.provider :aws do |aws, override|
@jsmpros
jsmpros / simple-rest.pc.txt
Created September 14, 2022 20:41
Simple PeopleCode example that invokes a REST GET without metadata
Local Message &resp;
Local Message &req;
Local IBConnectorInfo &connectorInfo;
Local boolean &bRet;
Local string &sJson;
Local string &sUrl;
REM ** IB_GENERIC predates REST. IB_GENERIC_REST is an alternative in later tools releases;
&req = CreateMessage(Message.IB_GENERIC);
@nvg
nvg / psunit_base.ppc
Last active February 24, 2022 03:31
peoplecode: PSUnit base
import TTS_UNITTEST:TestBase;
class Test extends TTS_UNITTEST:TestBase
method Test();
method Run();
method Setup();
protected
private
instance string &someValue;
@iversond
iversond / shell_template.sh
Last active February 21, 2022 18:45
Shell script template to use when creating new scripts. Borrows work from JR Bing's provision.sh in ps-vagabond
#!/usr/bin/env bash
# shellcheck disable=2059,2154,2034,2155,2046,2086
#===============================================================================
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 spelllang=en ft=sh
#===============================================================================
#
# FILE: shell_template.sh
#
# USAGE: ./shell_template.sh
#