Skip to content

Instantly share code, notes, and snippets.

@rileytestut
rileytestut / ExportIPA.swift
Last active July 12, 2024 03:03
Export Swift Playgrounds .ipa
import Foundation
// Export running app as .ipa, then return path to exported file.
// Returns String because app crashes when returning URL from async function for some reason...
func exportIPA() async throws -> String
{
// Path to app bundle
let bundleURL = Bundle.main.bundleURL
// Create Payload/ directory
# Use Google Cloud Platform stackdriver with python structlog
from google.cloud.logging import Client
from google.cloud.logging import _helpers
from google.cloud.logging.handlers import CloudLoggingHandler
from google.cloud.logging.handlers.transports.background_thread import _Worker
# pip install python-json-logger
from pythonjsonlogger import jsonlogger
@mrandri19
mrandri19 / main.c
Last active July 3, 2022 19:30
main.c: Modern text rendering with Linux: Part 1
#include <stdio.h>
#include <freetype2/ft2build.h>
#include FT_FREETYPE_H
int main() {
FT_Library ft;
FT_Error err = FT_Init_FreeType(&ft);
if (err != 0) {
printf("Failed to initialize FreeType\n");
@GiovanniFrigo
GiovanniFrigo / stillalive.rc
Last active April 12, 2019 13:42 — forked from rawdatalab/stillalive.rc
STILL ALIVE as a Bash script with beep (didn't create, just sharing) - sox version
# Let 'em know that we're Still Alive
# http://pastebin.com/f72f8f72d (no longer valid)
# On macOS, install sox with brew: `brew install sox`
#!/bin/bash
echo -n "This "
play --no-show-progress --null --channels 1 synth 0.200 sine 784
echo -n "was "
play --no-show-progress --null --channels 1 synth 0.200 sine 740
echo -n "a "
@shihanng
shihanng / .chunkwmrc
Last active January 6, 2024 04:17
chunkwm + skhd
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
@jessfraz
jessfraz / boxstarter.ps1
Last active July 7, 2024 22:46
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@bruth
bruth / README.md
Last active July 2, 2024 13:36
Postgres push notification

Postgres push triggers

Watch a table for changes and push a notification with a payload describing the change.

Example

In the Postgres shell:

-- Create the functions
@FLamparski
FLamparski / index.html
Created September 4, 2014 20:13
Reactivity in vanilla JS? Yes you can!
<!DOCTYPE html>
<html>
<head>
<title>Object.observe</title>
</head>
<body>
<h1 reactive>Title here</h1>
<p reactive>Text here</p>
<hr />
<p><b>Hey!</b> Open up the console and change the <tt>title</tt>
@trey
trey / git-commit-author-rewrite.md
Last active July 3, 2024 15:56
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active August 5, 2024 13:01
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap