Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Number>xxx-xxx-xxxx</Number>
<Number>yyy-yyy-yyyy</Number>
</Dial>
</Response>
@achiang
achiang / .vimrc
Last active January 29, 2019 17:46
execute pathogen#infect()
syntax on
filetype plugin indent on
set secure
set autoindent
set smarttab
set expandtab
set tabstop=8
@achiang
achiang / xps13_9360_ubuntu16.04.md
Last active January 13, 2022 22:12
Dell XPS 13 9360 + Ubuntu 16.04: fixing papercuts

Upfront

firewall {
all-ping enable
broadcast-ping disable
config-trap disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name eth0in {
default-action reject
$ python decl_enum.py
/home/vagrant/venv/lib/python3.4/site-packages/sqlalchemy/sql/default_comparator.py:153: SAWarning: The IN-predicate on "employee.type" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.
'strategies for improved performance.' % expr)
2015-12-14 04:09:53,442 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1
2015-12-14 04:09:53,442 INFO sqlalchemy.engine.base.Engine ()
2015-12-14 04:09:53,443 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1
2015-12-14 04:09:53,444 INFO sqlalchemy.engine.base.Engine ()
2015-12-14 04:09:53,445 INFO sqlalchemy.engine.base.Engine PRAGMA table_info("employee")
2015-12-14 04:09:53,446 INFO sqlalchemy.engine.base.Engine ()
2015-12-14 04:09:53,447 INFO sqlalchemy.engine.base.Engine
The default wrapping in most tools disrupts the visual structure of the code, making it more difficult to
understand. The limits are chosen to avoid wrapping in editors with the window width set to 80, even if the tool
places a marker glyph in the final column when wrapping lines. Some web based tools may not offer dynamic line
wrapping at all.
Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that
can reach agreement on this issue, it is okay to increase the nominal line length from 80 to 100 characters
(effectively increasing the maximum length to 99 characters), provided that comments and docstrings are still
wrapped at 72 characters.
#!/bin/sh
xrandr --output eDP1 --auto --output DP1 --auto --panning 3840x2400+3200+0 --scale 2x2 --right-of eDP1
2015/05/01 Opening Balance
Assets:Cash 100 TZS
Equity:Initial Capital
2015/05/07 Prepay for EUR
Assets:Cash -50 TZS
Currency:TZS 50 TZS
Assets:EUR 55.556 EUR
Currency:EUR -55.556 EUR
#!/bin/bash
# This script should be run with sudo
set -e
# Replace with Depends after conversion to package
apt-get install lxc systemd-services uidmap -y
########################################################################
## Setup for unprivileged container
@achiang
achiang / private.xml
Created December 18, 2013 23:19
Proper capslock behavior for Ubuntu / MacVim users
<?xml version="1.0"?>
<root>
<appdef>
<appname>MACVIM</appname>
<equal>org.vim.MacVim</equal>
</appdef>
<item>
<name>Caps to Control for MacVim only</name>
<identifier>private.macvimdef</identifier>