Skip to content

Instantly share code, notes, and snippets.

View mdunbavan's full-sized avatar

Mark Dunbavan mdunbavan

View GitHub Profile
@kevinelliott
kevinelliott / 1-macOS-10.12-sierra-setup.md
Last active February 5, 2024 07:22
macOS 10.12 Sierra Setup

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

@jamescmartinez
jamescmartinez / githubssh.sh
Last active November 4, 2023 14:58
Because setting up SSH on GitHub shouldn't take 10 pages of tutorials...
ssh-keygen -t ed25519 -C "your_email@example.com"
pbcopy < ~/.ssh/id_ed25519.pub
@parmentf
parmentf / GitCommitEmoji.md
Last active May 4, 2024 16:59
Git Commit message Emoji
@lukeholder
lukeholder / import.php
Last active January 10, 2018 09:58
Basic example to import Products and their variants into Craft Commerce
<?php
namespace Craft;
// This file could be placed into your public_html folder and visited to import a cheese product.
$craft = require '../craft/app/bootstrap.php';
$craft->plugins->loadPlugins();
$newProduct = new Commerce_ProductModel();
@hatefulcrawdad
hatefulcrawdad / SassMeister-input.scss
Last active December 16, 2015 17:46
Topic Color Idea
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// Bourbon (v4.2.3)
// ----
@import "bourbon/bourbon";
$topics: (
html: #39ADD1,
@jamescmartinez
jamescmartinez / slack_delete.rb
Last active January 4, 2021 21:28
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@katzueno
katzueno / global_nav.php
Created May 30, 2015 04:21
Sakan テーマのグローバルナビで、英語判定を行うチェックを追加。英語だったら、ハンドルを表示しない。
<?php defined('C5_EXECUTE') or die("Access Denied.");
$nh = Core::make('helper/navigation');
$th = Core::make('helper/text');
$trail = $nh->getTrailToCollection($c);
$isRoot = null;
if (is_array($trail) && count($trail) > 1) {
$count = count($trail);
array_splice($trail, $count - 1);
$topC = array_pop($trail);
@garyconstable
garyconstable / TestPlugin.php
Last active December 29, 2016 11:11
Craft CMS Loop through categories and children from within a plugin
<?php
namespace Craft;
class TestPlugin extends BasePlugin
{
function getName()
{
return Craft::t('Test Plugin');
}
#!/bin/bash
#
# Some SASS helpers
#
# INSTALL:
#
# * save the sassbash file somewhere
# * chmod +x it to make it executable
# * add path to script in your .bashrc
# * . /path/to/sassbash
@sahibalejandro
sahibalejandro / MakeViewCommand.php
Created April 13, 2015 04:45
Laravel Command make:view
<?php namespace Sahib\Generators\Commands;
use File;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
/**
* Class MakeViewCommand
* @package Sahib\Generators\Commands
*/