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
[buildout] | |
eggs-directory = /home/bruce/tmp/buildout-eggs |
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 | |
temp=$(smartctl -d ata -A /dev/sda|grep Tempera|cut -c 88-90) | |
echo "`date +'%F %T'` Temperature: $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
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other | |
# stuff too? No support for SuperColumns, but that should be easy enough to add. | |
import bisect | |
import copy | |
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn | |
class SSTable(object): |
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 | |
P="ibus-pinyin-extraphrase-0.1.20100118.tar.xz" | |
SRC_URI="http://hslinuxextra.googlecode.com/files/${P}" | |
wget -P /tmp -c ${SRC_URI} | |
tar --strip 1 -C/usr/share/ibus-pinyin/db -xvf /tmp/${P} | |
cd /usr/share/ibus-pinyin/db/ | |
ln -sf data/sougou-full.db local.db |
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
set-option -g prefix ` | |
unbind-key C-b | |
bind-key ` last-window | |
bind '~' split-window "exec htop" | |
bind C-h split-window -h | |
bind C-v split-window -v | |
bind C-p paste-buffer | |
bind-key -n C-left prev | |
bind-key -n C-right next |
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
my_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
for item in my_list: | |
if item == 3 or item == 7: | |
my_list.remove(item) |
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
CREATE OR REPLACE FUNCTION array_pop(a anyarray, element character varying) | |
RETURNS anyarray | |
LANGUAGE plpgsql | |
AS $function$ | |
DECLARE | |
result a%TYPE; | |
BEGIN | |
SELECT ARRAY( | |
SELECT b.e FROM (SELECT unnest(a)) AS b(e) WHERE b.e <> element) INTO result; | |
RETURN result; |
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
zargs **/*.py -- sed -i "s|self.loginAndSelectMyHealthTab|self.login|g" |
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
pg-deps: | |
pkg: | |
- installed | |
- names: | |
- postgresql-9.1 | |
- postgresql-contrib-9.1 | |
bar: | |
postgres_user: | |
- present |
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
/opt/google/chrome/chrome --type=renderer --lang=en-GB --force-fieldtrials=CacheSensitivityAnalysis/No/ForceCompositingMode/disable/GlobalSdch/global_enable_sdch/HttpPipeliningCompatibility/disable_test/InfiniteCache/No/NetworkConnectivity/disable_network_stats/OmniboxDisallowInlineHQP/Standard/OmniboxHUPCreateShorterMatch/Standard/OmniboxHUPCullRedirects/Standard/OmniboxSearchSuggestTrialStarted2012Q4/5/OneClickSignIn/Standard/Prerender/PrerenderEnabled/PrerenderFromOmnibox/OmniboxPrerenderEnabled/SBInterstitial/V2/SpdyCwnd/cwndDynamic/SpeculativePrefetching/Disabled/Test0PercentDefault/group_01/UMA-Dynamic-Binary-Uniformity-Trial/default/UMA-Session-Randomized-Uniformity-Trial-5-Percent/group_05/UMA-Uniformity-Trial-1-Percent/group_25/UMA-Uniformity-Trial-10-Percent/group_06/UMA-Uniformity-Trial-20-Percent/group_04/UMA-Uniformity-Trial-5-Percent/group_14/UMA-Uniformity-Trial-50-Percent/default/WarmSocketImpact/warm_socket/ --enable-crash-reporter=46E3CAA6D3F07D0B9953D5F6DBF7CA95,Ubuntu 12.04.1 LTS --disable |
OlderNewer