Skip to content

Instantly share code, notes, and snippets.

@martinhoeller
martinhoeller / NSColor+Values.swift
Last active April 8, 2024 08:45
NSColor Catalog Colors
import Cocoa
import Foundation
var colors: [NSColor] = [.labelColor, .secondaryLabelColor, .tertiaryLabelColor, .quaternaryLabelColor, .textColor, .placeholderTextColor, .selectedTextColor, .textBackgroundColor, .selectedTextBackgroundColor, .keyboardFocusIndicatorColor, .unemphasizedSelectedTextColor, .unemphasizedSelectedTextBackgroundColor, .linkColor, .separatorColor, .selectedContentBackgroundColor, .unemphasizedSelectedContentBackgroundColor, .selectedMenuItemTextColor, .gridColor, .headerTextColor, .controlAccentColor, .controlColor, .controlBackgroundColor, .controlTextColor, .disabledControlTextColor, .selectedControlColor, .selectedControlTextColor, .alternateSelectedControlTextColor, .windowBackgroundColor, .windowFrameTextColor, .underPageBackgroundColor, .findHighlightColor, .highlightColor, .shadowColor
]
for color in colors {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
@pirate
pirate / docker-compose-backup.sh
Last active March 31, 2024 00:51
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@stevemoser
stevemoser / IncompatibleAppsList.plist
Created June 20, 2019 19:38
List of 235 apps incompatible with macOS Catalina 10.15
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IncompatiblePaths</key>
<array>
<dict>
<key>Application Name</key>
<string>Sxs Memory Card Driver</string>
<key>Blurb</key>
@ericbaranowski
ericbaranowski / README.md
Created April 20, 2018 16:34
Node CRUD Heroku

express and knex

From project root directory:

$ express --hbs --git

$ npm install

  • Installs boilerplate dependencies

$ npm install --save pg knex method-override

@keilahoover
keilahoover / full-stack-express-app.md
Created April 9, 2018 20:33
Full Stack Express/Knex App

Full Stack Express/Knex App, simplified

In this guide substitute projectname, dbname, tablename, and colnameN for your own values.


Express Setup

  1. New repo on GitHub, choose .gitignore: Node, a license, and clone it to your machine
  2. sh: cd projectname && atom .
@RulerOf
RulerOf / pfsense-on-oracle-linux-7.md
Last active September 13, 2021 04:38
Installing pfSense on KVM in Enterprise Linux 7

Installing pfSense on KVM in Enterprise Linux 7

We download the latest release of pfSense as a gzipped ISO, then extract it and pass it to virt-install to get the VM up and running. Interactive portions of setup are handled with a VNC viewer because the pfSense installer doesn't seem to be able to work with virt-install's native console redirection, at least not out of the box. I'd love a tip from anyone if it's possible to fix that somehow.

CentOS 8 instructions are this way.

Instructions

Find the latest release here.

@rowanphipps
rowanphipps / macOS_rEFInd_guide.md
Created August 10, 2017 17:53
A guide to using rEFInd on macOS

A Guide to Multibooting a Mac

Disclaimer: This has the potential to destroy all the data on your drive. Make sure you have adequate (and verified working) backups before you proceed. You have been warned!

That being said this should leave all of your data untouched.

Background:

I have a mid-2012 15” non-Retina Mac book pro with a 1TB hard drive. I decided that I wanted to make my system faster by replacing the hard drive with an ssd and while I was at it I decided I also wanted to have Windows and Ubuntu partitions. Doing it this way meant that I had no data on the SSD while I experimented with partitions and boot managers although everything I did should be possible on a drive with an existing system.

Goals:

  • Multiple OSs installed with the ability to add more

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@vanhalt
vanhalt / kali-arm_raspberry3.md
Created March 30, 2016 05:38
Kali Linux ARM (kali-2.1.2-rpi2.img) running on Raspberry 3 with a 32GB micro sd