ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
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
| import os | |
| import urllib2 | |
| import contextlib | |
| import StringIO | |
| from django.core.files.storage import get_storage_class, FileSystemStorage | |
| from django.core.files import File | |
| from django.conf import settings | |
| from galleries.models import GalleryImage |
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
| # Block a specific MAC address on the D-Link DSL-2750U (using parental control). | |
| # May also work for other/similar D-Link routers (eg; 27xx) | |
| import urllib,urllib2 | |
| import random,json,re | |
| import base64 | |
| # Modify as necessary | |
| login = base64.b64encode('admin:password') # username:password | |
| mac = '00:00:00:00:00:00' # MAC address to block in the form xx:xx:xx:xx:xx:xx |
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
| [Desktop Entry] | |
| Name=Blender_terminal | |
| Comment=Blender_terminal | |
| Exec=gnome-terminal -x sh -c "cd /home/user/Software/blender_270a &&./blender" | |
| Icon=/home/user/Software/blender_270a/icons/48x48/apps/blender.png | |
| Terminal=false | |
| Type=Application | |
| X-Ayatana-Desktop-Shortcuts=Blender1;Blender2; | |
| [Blender1 Shortcut Group] |
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
| def get_cache_key(model, pk): | |
| """ | |
| Generates a cache key based on ``WRITE_CACHE_PREFIX``, the cache key prefix | |
| defined in the settings file (if any), the Django app and model name, and | |
| the primary key of the object. | |
| """ | |
| params = { | |
| 'prefix': getattr(settings, 'WRITE_CACHE_PREFIX', ''), | |
| 'app': model._meta.app_label, | |
| 'model': model._meta.object_name, |
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 QuerySetDoubleIteration(Exception): | |
| "A QuerySet was iterated over twice, you probably want to list() it." | |
| pass | |
| # "Skinny" here means we use iterator by default, rather than | |
| # ballooning in memory. | |
| class SkinnyManager(Manager): | |
| def get_query_set(self): | |
| return SkinnyQuerySet(self.model, using=self._db) |
-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
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
| #!/bin/bash | |
| repos=( | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/Git.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/Ruby.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/RubyAMP.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/Ruby Haml.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/ruby-sass.tmbundle" | |
| "/Users/rob/Library/Application Support/TextMate/Bundles/ruby-shoulda.tmbundle" |
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
| # -*- Conf -*- | |
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| showbranch = auto | |
| ui = true | |
| # color.branch | |
| # A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or |
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
| git config --global user.name "Tarcisio Coutinho" | |
| git config --global user.email "tcs5cin@gmail.com" | |
| git config --global color.ui true | |
| git config --global alias.s status | |
| git config --global alias.c checkout | |
| git config --global alias.b branch | |
| git config --global alias.lol log --oneline --graph --decorate |