- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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
com.xx.Exception: java.io.FileNotFoundException | |
at org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:324) | |
... | |
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException | |
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200) | |
... 46 more | |
Caused by: com.xx.WrongSizeException: blahblah | |
... 64 more |
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
#!/bin/bash | |
# remove ':' from screen id | |
PROFILE="session${DISPLAY#:}" | |
PROFILE_DIRECTORY="$HOME/.google-chrome/$PROFILE" | |
mkdir -p $PROFILE_DIRECTORY | |
# import profile (includes bookmark) from origin | |
if [ ! -d "$PROFILE_PATH/Default" ]; then | |
cp -r $HOME/.config/google-chrome/Default $PROFILE_DIRECTORY/Default; |
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
#!/bin/sh | |
# Uncomment the following two lines for normal desktop: | |
# unset SESSION_MANAGER | |
# exec /etc/X11/xinit/xinitrc | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & |
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 fm.last.moji.MojiFile; | |
/** | |
* Created by developer on 4/30/15. | |
*/ | |
class MogileOperator implements Runnable { | |
@Override | |
public void run() { | |
MojiFile rickRoll = TestMojiConcurrency.moji.getFile("rick-astley"); |
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
# Follows the squid format in default: | |
# logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt | |
# http://www.squid-cache.org/Doc/config/logformat/ | |
%{NUMBER:timestamp}\s+%{NUMBER:response_time} %{IPORHOST:src_ip} %{WORD:squid_request_status}/%{NUMBER:http_status_code} %{NUMBER:reply_size_include_header} %{WORD:http_method} %{URI:request_url} %{USERNAME:user} %{WORD:squid_hierarchy_status}/%{IPORHOST:server_ip_or_peer_name} (?<mime_content_type>\S+\/\S+) |
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
{ | |
"Version": "2008-10-17", | |
"Id": "Policy1426504761539", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1426504756244", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "*" | |
}, |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Example: You have a branch refactor
that is quite different from master
. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.
On master:
> git co -b temp
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 boto | |
from client import conn | |
bucket_name = '[YOUR BUCKET NAME]' | |
object_key = '[YOUR OBJECT KEY]' | |
upload_id = '[UPLOAD ID], can get it by s3cmd multipart s3://[YOUR BUCKET NAME]' | |
def main(): | |
bucket = conn.lookup(bucket_name) | |
complete_part_upload(bucket, object_key, upload_id) |