- Update OS
sudo apt-get update && sudo apt-get upgrade
| #!/bin/bash | |
| # Global variable declarations | |
| format="plain" | |
| directories=() | |
| current_directory=`pwd` | |
| report_directory="${current_directory}/report/" | |
| fresh_report_directory="0" | |
| # usage |
| # File: etc/default/docker | |
| # Use DOCKER_OPTS to modify the daemon startup options. | |
| #DOCKER_OPTS="" | |
| DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock" |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """This module's docstring summary line. | |
| This is a multi-line docstring. Paragraphs are separated with blank lines. | |
| Lines conform to 79-column limit. | |
| Module and packages names should be short, lower_case_with_underscores. | |
| Notice that this in not PEP8-cheatsheet.py |
| //factory pattern + Abstract factory pattern | |
| //Client | |
| var BMWDealer = function(series){ | |
| var seriesRequest = series, seriesType = [1, 2, 3, 4], seriesModel; | |
| var getSeriesModel = function(series, i){ | |
| if(seriesRequest === series){ | |
| seriesModel = Series(series); | |
| return true; | |
| } |
| [ssh_connection] | |
| ssh_args = -F ssh.cfg | |
| control_path = ~/.ssh/mux-%r@%h:%p |
Title: Tmux project sessions
Date: 2014-12-24 17:00
Tags: Tmux, learn-X-in-Y-minutes
Author: K. Y. Ng
This is a tutorial for setting up Tmux for saving terminal project sessions.
Tmux helps you emulate several shell sessions within the same terminal
window.
| from flask import Flask, render_template | |
| app = Flask(__name__) | |
| @app.route('/<user_id>/posts') | |
| def api_posts(user_id): | |
| """Displays a page that returns all the posts created by this user.""" | |
| from functools import update_wrapper | |
| from django.contrib import admin | |
| from django.contrib.admin import ModelAdmin | |
| from django.contrib.admin.templatetags.admin_urls import add_preserved_filters | |
| from django.core.exceptions import PermissionDenied | |
| from django.shortcuts import render | |
| from myapp.models import Widget | |
| from myapp.forms import ManageWidgetForm |
| import ConfigParser, mmap | |
| config_file = "/usr/share/applications/google-chrome.desktop" | |
| add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"] | |
| option = add_string_to_each_section[0] | |
| value = add_string_to_each_section[1] | |
| class Fixer: | |
| def check(self, cf, option, value): |