⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
AuthType Basic | |
AuthName "Restricted Files" | |
AuthBasicProvider file | |
AuthUserFile /path/to/password/file | |
Require user valid-user |
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
adduser --system --no-create-home --group --shell /bin/false --disabled-password --disabled-login redis |
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
""" | |
Backbone.js handler and mongodb based handler for Tornado. | |
`BackboneHandler` handles the sync protocol for Backbone.js. Inherit | |
from the class and implement the model methods: | |
* create_model | |
* update_model | |
* get_model | |
* delete_model | |
* get_collection |
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
#!/usr/bin/env python | |
# | |
# Very simple Python script to dump all emails in an IMAP folder to files. | |
# This code is released into the public domain. | |
# | |
# RKI Nov 2013 | |
# | |
import sys | |
import imaplib | |
import getpass |
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
""" | |
This script uses Github's API V3 with Basic Authentication to export issues from | |
a repository. The script saves a json file with all of the information from the | |
API for issues, comments, and events (on the issues), downloads all of the | |
images attached to issues, and generates a markdown file that can be rendered | |
into a basic HTML page crudely mimicking Github's issue page. If the gfm module | |
is available, the script will go ahead and render it itself. | |
In the end, you'll be left with a folder containing a raw .json file (which you | |
can use to extract information for your needs, or to import it somewhere else), |
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
content_type = ContentType.objects.get(app_label='', model='') | |
#get all permssions for this model | |
perms = Permission.objects.filter(content_type=content_type) | |
group = Group.objects.get(name='') | |
for p in perms: | |
group.permissions.add(perms) |