- Open Automator
- Create a new Service
- Set “Service receives selected” to
files or folders
inany 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expand save panel by default | |
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | |
# Disable the “Are you sure you want to open this application?” dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
# Disable shadow in screenshots | |
defaults write com.apple.screencapture disable-shadow -bool true | |
# Automatically open a new Finder window when a volume is mounted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
} | |
function the_facebook_graph_data() { | |
// setup the default site attributes | |
$graph; | |
$graph["site_name"] = "YOUR_SITE_NAME"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require 'http' | |
url = require 'url' | |
path = require 'path' | |
fs = require 'fs' | |
port = process.argv[2] or 8888 | |
headers = | |
'Content-Type': 'text/plain' | |
http.createServer( (request, response) -> | |
uri = url.parse(request.url).pathname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ffmpeg form 'fluent-ffmpeg'; | |
const filePath = '/Users/yoann/Desktop/video.avi'; | |
const route = (req, res) => { | |
res.writeHead(200, getHeaders({'Content-Type': 'video/mp4'})); | |
ffmpeg(filePath) | |
.format('mp4') | |
.addOptions([ | |
'-movflags frag_keyframe+faststart' | |
]) |