Skip to content

Instantly share code, notes, and snippets.

View My PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v.1.20130420
Comment: http://openpgpjs.org
xsFNBFIrew8BD/9gyeftvnJTVFxwXmalP8oLA61knC0BkaPSC7joqoghHML4
XwVhPwGbrhFb03m8P26Hef0+IoCJBtpbtDhP/8AOzWBp26oM2t0X8hn1tcUF
AL89AOTzZrbY9BZMO26MUxVpom8dVk5DttFfCgnSQen3g1c4+Ad57LlE4fG5
tGt3R9akHMWP3QHCYw7Ik5CnEUQL7AtMzW/baCYuTUUy03v03F5gL2rVXv8x
TNPad8ICLm1/Xc28nJUu1WmQXegUiw2cuwnVv8ycLhYGd5ls41kqWzGorhsr
DZkktB4H81bhgHq3NJEZFmN95aN4Aw4z5V1+wyKebo+fjeRgzIQRULD5BK7U
@idleberg
idleberg / scopes.md
Last active May 22, 2019 — forked from iambibhas/scopes.txt
List of scopes for Sublime Text and Atom. Follow three simple rules when contributing: 1. Link whenever possible, use atom.io and Package Control links (if possible) 2. Always link third-party packages, use current Markdown link structure 3. Alphabetize!
View scopes.md
File type Sublime Text Atom
ActionScript source.actionscript.2 ?
AppleScript source.applescript [.source.applescript]
ASP source.asp ?
Batch File source.dosbatch ?
BibTex source.bibtex ?
BridleNSIS [source.nsis.bridle] [.source.nsis.bridle]
C source.c [.source.c]
C# source.cs [.source.cs]
@idleberg
idleberg / fish_shell.md
Last active May 3, 2021
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.
View fish_shell.md

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@idleberg
idleberg / Install-Mcrypt.md
Last active Apr 6, 2021
Install Mcrypt on macOS
View Install-Mcrypt.md

Setup php-mcrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew and PECL (comes with PHP)

# PHP 7.3
View PHP Localization.php
<?php
session_start();
if (isset($_GET["locale"])) {
$locale = $_GET["locale"];
} else if (isset($_SESSION["locale"])) {
$locale = $_SESSION["locale"];
} else {
$locale = "en_US";
@idleberg
idleberg / DropboxIgnore.md
Last active Dec 8, 2020
Ignore node_modules/bower_components folders in your Dropbox
View DropboxIgnore.md

This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI

I'm a beginner at bash, so all improvements are welcome!

#!/bin/bash

set -e

# SETTINGS
@idleberg
idleberg / spotlight_indexing.md
Last active Dec 15, 2015
Enable Spotlight indexing for drives
View spotlight_indexing.md

Enable Spotlight indexing for volumes (network shares, external disks, etc.) in Terminal

# enable indexing
mdutil /Volumes/name -i on

# disable indexing
mdutil /Volumes/name -i off

# check indexing status
@idleberg
idleberg / sublime-chmod.py
Last active Nov 18, 2018
Make files of Sublime Text package executable, runs on installation/upgrade
View sublime-chmod.py
# https://gist.github.com/idleberg/03bc3766c760bb4b81e3
import os, stat, sublime, sublime_plugin
# Array of files, relative to package directory
files = [
'my-script.sh'
]
def plugin_loaded():
@idleberg
idleberg / droppid.sh
Last active Oct 5, 2018
Script to alter the priority of the Dropbox client (on Mac OS X)
View droppid.sh
#!/bin/bash
# droppid v0.2.3
# Public Domain Mark 1.0
# https://gist.github.com/idleberg/81ed196f2401be045893
#
# Usage: sudo [sh] droppid.sh [priority]
# Check for sudo
if [ "$EUID" -ne 0 ]; then
@idleberg
idleberg / sublime-npm.py
Last active Nov 17, 2015
Install npm dependencies (global) for Sublime Packages, e.g. linters
View sublime-npm.py
# https://gist.github.com/idleberg/ca5714fd2b9607db02b8
import os, sublime, sublime_plugin, subprocess
# Array of required Node packages
packages = [
''
]
def plugin_loaded():