Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff Lindsay progrium

View GitHub Profile
@progrium
progrium / README.md
Last active Oct 17, 2021
Large Type CLI utility for Mac in less than 80 lines of Go
View README.md

largetype

largetype screenshot

Building

Note: For now, Apple Silicon users need to be set up for x86 mode

First, download Go or brew install go. Then, put largetype.go in a directory called largetype and from there run:

$ go mod init largetype
@douglashill
douglashill / main.m
Last active Apr 24, 2022
A minimal iOS 13 app that is set up in Objective-C rather than using a storyboard and UIApplicationSceneManifest
View main.m
@import UIKit;
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
@end
@implementation SceneDelegate
@synthesize window = _window;
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
@mholt
mholt / macapp.go
Created May 18, 2018
Distribute your Go program (or any single binary) as a native macOS application
View macapp.go
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active Jul 25, 2022
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.
View Swift Meets CCxx.md

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active Jun 28, 2022
Public DNS Pointing to localhost (127.0.0.1)
View DNS_TO_LOCALHOST.markdown

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fbi.com - 👏 👏 👏 👏 👏
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
  • [*.]yoogle.com
@uchcode
uchcode / JXA-Window.js
Last active Aug 4, 2020
JXA (JavaScript for Automation) Window applet template.
View JXA-Window.js
ObjC.import('Cocoa')
function UserInterface() {
this.okButton = Button(300, 10, 90, 26); {
this.okButton.title = 'OK'
}
this.cancelButton = Button(210, 10, 90, 26); {
this.cancelButton.title = 'Cancel'
this.cancelButton.keyEquivalent = '\u{1b}'
}
@oubiwann
oubiwann / appify.sh
Last active Jul 28, 2022 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
View appify.sh
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@andreas
andreas / envelope_encryption.go
Created Feb 3, 2015
Envelope Encryption with Amazon KMS and Go
View envelope_encryption.go
package main
import (
"bytes"
"crypto/rand"
"encoding/gob"
"fmt"
"io/ioutil"
"os"
"time"
View gist:6a24ae8d7ab93bc65579
export PS1="\[\033[01;31m\]\$(status=\$?; [[ \$status -ne 0 ]] && echo \"[\$status] \")\[\033[01;32m\]\u@\h \[\033[01;34m\]\w\n\$ \[\033[00m\]"
alias reload="curl -s https://gist.githubusercontent.com/progrium/6a24ae8d7ab93bc65579/raw/gistfile1.txt > ~/.profile.me; source ~/.profile"
alias g="git"
alias gpr="git pull --rebase origin"
alias gprr="git pull --rebase"
alias gpu="git push origin"
alias gpuu="git push"
alias gs="git status"
@emasaka
emasaka / pipeline.rb
Created Sep 29, 2014
shell-like pipeline in Ruby DSL
View pipeline.rb
#!/usr/bin/env ruby
module PipeOperator
refine Array do
def |(x)
PipeLine.new(self) | x
end
end
end