mogrify -quality 50 *.jpg
This file contains hidden or 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
tell application "Transmit" | |
set myFave to item 1 of (favorites whose name is "s3.amazonaws.com") | |
tell current tab of (make new document at end) | |
connect to myFave with mount | |
close | |
end tell | |
end tell | |
tell application βTransmitβ to quit |
This file contains hidden or 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
#!/usr/bin/env node | |
/* | |
* Hook removing files you do not want to keep in your plugin bundle. | |
* These files have to be configured from the "filesToRemove" attribute of | |
* the package.json file of your plugin. | |
* | |
* Here is an example where demo is a folder and foo.txt a file : | |
* filesToRemove : ["demo", "foo.txt"] | |
*/ |
This file contains hidden or 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
/* | |
* This hook adds all the needed config to implement a Cordova plugin with Swift. | |
* | |
* - It adds a Bridging header importing Cordova/CDV.h if it's not already | |
* the case. Else it concats all the bridging headers in one single file. | |
* | |
* /!\ Please be sure not naming your bridging header file 'Bridging-Header.h' | |
* else it won't be supported. | |
* | |
* - It puts the ios deployment target to 7.0 in case your project would have a |
This file contains hidden or 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
class MD5{ | |
static func stringSum(string: String) -> String { | |
var digest = [UInt8](count: Int(CC_MD5_DIGEST_LENGTH), repeatedValue: 0) | |
if let data = string.dataUsingEncoding(NSUTF8StringEncoding) { | |
CC_MD5(data.bytes, CC_LONG(data.length), &digest) | |
} | |
var digestHex = "" | |
for index in 0..<Int(CC_MD5_DIGEST_LENGTH) { |
-
Run an interractive shell (ctrl+P ctrl+q to detach):
docker run -i -t <imageName> /bin/bash
-
Update an image:
docker commit <containerId> <imageName>
-
Save an image to a tar archive:
docker save <imageName> > <image.tar>
-
Load an image from a tar archive:
This file contains hidden or 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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to make opened Markdown files always be soft wrapped: | |
# | |
# path = require 'path' | |
# |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
OlderNewer