This gist has my tmux config.
You can find it here: https://gist.github.com/bartman/1eed0693b34834381942
The files need to be placed in following tree structure:
~/
├── .tmux.conf
└── .tmux/
├── current-path-1.9+.conf
| #!/usr/bin/env python3 | |
| # https://superuser.com/questions/413349/limiting-use-of-ram-in-chrome | |
| import sys, os, psutil | |
| limit = 200 #default 200MB | |
| if len(sys.argv) == 2: | |
| try: | |
| limit = int(sys.argv[1]) | |
| except: |
| based upon code at: https://github.com/ledgersmb/LedgerSMB/blob/master/lib/LedgerSMB/Scripts/import_csv.pm#L308 | |
| There are 9 columns, 0-9. In spreadsheet terms "A" through "I" | |
| A/0 - account number, like "1001" | |
| B/1 - description, free form text | |
| C/2 - charttype: 'A' for account, 'H' for heading | |
| D/3 - category: A = asset, L = liability, Q = Equity, I = Income, E = expense | |
| E/4 - contra: f for regular account, t for contra accounts, such as Liability and Expense | |
| F/5 - tax: t if a tax account, f otherwise |
This gist has my tmux config.
You can find it here: https://gist.github.com/bartman/1eed0693b34834381942
The files need to be placed in following tree structure:
~/
├── .tmux.conf
└── .tmux/
├── current-path-1.9+.conf
| # also you need to uncomment next line in Capfile | |
| # require 'capistrano/rails/assets' | |
| namespace :deploy do | |
| namespace :assets do | |
| Rake::Task['deploy:assets:precompile'].clear_actions | |
| desc 'Precompile assets locally and upload to servers' | |
| task :precompile do |
I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.
As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:
group browsers {
cpu {
# Set the relative share of CPU resources equal to 25%
cpu.shares = "256";
}| # Usage: | |
| # 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/submodule_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, SubmoduleStrategy | |
| module SubmoduleStrategy | |
| # do all the things a normal capistrano git session would do |
| # this include won't work for some reason: | |
| # include Capistrano::Git::DefaultStrategy | |
| module SubmoduleStrategy | |
| # check for a .git directory | |
| def test | |
| test! " [ -d #{repo_path}/.git ] " | |
| end |
| --- rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:42:39.031057949 +0400 | |
| +++ rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:48:14.078605821 +0400 | |
| @@ -97,6 +97,7 @@ | |
| #define MAX_SERVICE_NAMES 64 | |
| static int NumServiceNames = 0; | |
| static char const *ServiceNames[MAX_SERVICE_NAMES]; | |
| +static int ReactionOnNoServiceName = 1; | |
| PppoeSessionFunctionTable DefaultSessionFunctionTable = { | |
| PppoeStopSession, |
| /* | |
| This shows how to use HTTP chunked transfer in libevent. It starts an HTTP server on port 8080; when the client connects, it outputs an message every second. After all messages are outputted, the server closes the HTTP connection. | |
| It has an unsolved crashing problem though... to see it crash, run the next commands in a shell. | |
| See my ML post "after the http client abruptly closes socket libevent (2.0.3-alpha) http server crashes" at http://archives.seul.org/libevent/users/Jan-2010/msg00054.html | |
| Compile with: | |
| gcc -Wall -g -std=c99 -D_GNU_SOURCE -Iinclude -Llib -levent -o chunk chunk.c |