Skip to content

Instantly share code, notes, and snippets.

View tommydunn's full-sized avatar
🖖

Tommy Dunn tommydunn

🖖
View GitHub Profile

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 31, 2026 18:26
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

function injectGitFileStatus()
{
const timeout = 5000;
const addedColor = "#8dc149";
const modifiedColor = "#cbcb41";
const stagedColor = "#ca2820";
const ignoredOpacity = "0.4";
const explorer = document.getElementById("workbench.view.explorer");
if (explorer)
@ethicka
ethicka / localhost-ssl-certificate.md
Last active February 15, 2026 03:59
Localhost SSL Certificate on Mac OS

🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!


This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

@codeZoner
codeZoner / com.startup.plist
Last active July 22, 2022 08:12
Launch Demon Start up with Bash Script with MySQL Example
<?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>
<!-- Launch Daemon do not always have access to all the path variables
As a results, scripts will sometimes fail if the you are using path variables inside them
To enable the script to have access to all path variables, open up a terminal and type in -->
<!-- echo $PATH -->
<!-- You can opt to filter out some of the path variables which are not required by script-->
<key>EnvironmentVariables</key>
@tommydunn
tommydunn / my-fluid-typography.md
Created August 31, 2017 21:58
Fluid/responsive setup that's worked well for me.
// Mixin
@mixin typography($font-size) {
  $base-line-height: $font-size * $ratio;
  $margin: $base-line-height;
  body {
    font-size: $font-size;
    line-height: ($font-size * $ratio);
  }
  h1 {
@tommydunn
tommydunn / zmv-examples.md
Last active February 21, 2022 08:08 — forked from niksmac/zmv-examples.md
ZMV-Examples (require autoload zmv)
# rename a section of a filename, i. e. example.1.{txt,conf,db} or 12345.1.{wav,ogg,mp3} and
# change the 1 to a 2 in the filename while preserving the rest of it.
  $ zmv -n '(*.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y.
  $ zmv -n '(*.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'

# Rename files to lower case
  $ zmv '*' '${(L)f}'

# serially all files (foo.foo > 1.foo, fnord.foo > 2.foo, ..)
@mfd
mfd / gotham.md
Last active May 13, 2026 13:32
Gotham font
https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css

<link rel="https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css">

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 18, 2026 02:42
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@codediodeio
codediodeio / auth.service.ts
Last active January 8, 2020 20:13
Service for Angular4 + Firebase Authentication
import { Injectable } from '@angular/core';
import { AngularFireAuth, AngularFireDatabase, FirebaseAuthState, AuthProviders, AuthMethods, AngularFire } from "angularfire2";
import { Router } from "@angular/router";
import * as firebase from 'firebase';
@Injectable()
export class AuthService {