Skip to content

Instantly share code, notes, and snippets.

@idleberg
idleberg / atom-macos-context-menu.md
Last active Jan 2, 2021
“Open in Atom” in macOS context-menu
View atom-macos-context-menu.md

Open in Atom

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /usr/local/bin/atom -n "$@"
  • Set “Pass input” to as arguments
  • Save as Open in Atom
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active Apr 30, 2021 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu
View sublime-text-macos-context-menu.md

Open in Sublime Text

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
  • Save as Open in Sublime Text
@idleberg
idleberg / atomizr_features.md
Last active Mar 24, 2017
Atomizr Feature Comparison
View atomizr_features.md
Functionality [Ruby][1] [Node][2] [Atom][3] [Sublime Text][4]
Atom to Sublime Text                     ✓       ✓      
Atom to TextMate
Atom to Visual Studio Code
Sublime Text to Atom
Sublime Text to TextMate
Sublime Text to Visual Studio Code
TextMate to Atom
TextMate to Sublime Text
@idleberg
idleberg / iscc
Created May 18, 2016 — forked from derekstavis/iscc
Compile InnoSetup scripts on unices
View iscc
#!/bin/sh
# For installation and usage, please refer to my blog post:
# http://derekstavis.github.io/posts/creating-a-installer-using-inno-setup-on-linux-and-mac-os-x/
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Derek Willian Stavis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@idleberg
idleberg / .htaccess
Last active Nov 25, 2017
Baikal Server Apache settings for iOS and macOS
View .htaccess
# Last tested with Baikal 0.4.6
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# iOS 9.2
RewriteRule /.well-known/carddav /html/card.php [R,L]
RewriteRule /.well-known/caldav /html/cal.php [R,L]
# Mac OS X 10.10
Redirect /.well-known/carddav /html/card.php
</IfModule>
@idleberg
idleberg / sublime-brew.py
Last active Nov 17, 2015
Install Brew dependencies for Sublime Packages, e.g. linters
View sublime-brew.py
# https://gist.github.com/idleberg/df8f04ec04d2b523d5ff
import os, sublime, sublime_plugin, subprocess
# Array of required Brew packages
packages = [
''
]
def plugin_loaded():
@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():
@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-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 / 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