Skip to content

Instantly share code, notes, and snippets.

View xiongchiamiov's full-sized avatar

James Pearson Hughes xiongchiamiov

View GitHub Profile
@xiongchiamiov
xiongchiamiov / gist:d3dc7b59ddee5bbd3024
Last active February 15, 2023 04:09
Things that annoy me about android apps for reddit

reddit is fun

  • UI is so cluttered and ungainly and requires so many clicks to do things I couldn't stand using it long enough to build a more complete list

relay for reddit

  • clicking through messages doesn't sync read state back to the website
  • after hiding a submission, opening the submission before it opens the original one
  • no way to view the comments on a submission that links to another post on reddit
  • have to scroll back up above all comments to add one yourself
  • voting on, replying to, etc. long comments requires scrolling back to the middle of the comment
  • no support for wiki pages
@xiongchiamiov
xiongchiamiov / activate
Last active January 30, 2017 17:32 — forked from rahulg/activate
export GOPATH="$(builtin cd "$(dirname "${BASH_SOURCE[0]:-$_}" )" && pwd)"
export OLDPS1=$PS1
export PS1="[go:$(basename $GOPATH)] $PS1"
alias gcd="cd $GOPATH"
deactivate() {
export PS1=$OLDPS1
unset GOPATH
unset OLDPS1
unalias gcd
unset deactivate
@xiongchiamiov
xiongchiamiov / gist:8658366
Created January 27, 2014 22:10
clementine backtrace
[$]> gdb /Volumes/Clementine/clementine.app/Contents/MacOS/clementine
GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb 6 22:51:23 UTC 2013)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ....
warning: Could not find object file "/src/macosx/qjson-0.7.1/build/src/CMakeFiles/qjson.dir/parser.cpp.o" - no debug information available for "parser.cpp".
@xiongchiamiov
xiongchiamiov / gist:7364582
Last active December 27, 2015 17:49
People hired as a direct result of open-source work
HOMEBREW_VERSION: 0.9.4
ORIGIN: http://github.com/mxcl/homebrew.git
HEAD: 5836e0c1589755bc2bdb222ca4186df22aa83538
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.3
CLT: 1.0.0.9000000000.1.1248867338
GCC-4.0: build 5493
HOMEBREW_VERSION: 0.9.4
ORIGIN: http://github.com/mxcl/homebrew.git
HEAD: 5836e0c1589755bc2bdb222ca4186df22aa83538
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.3
CLT: 1.0.0.9000000000.1.1248867338
GCC-4.0: build 5493

Thank you for your interest in contributing to [project] ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. This is a legally binding document, so please read it carefully before agreeing to it.

1. Definitions

"You" means the individual who Submits a Contribution to Us.
"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright.
"Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You.
"Material" means the work of authorship which is made available by Us to third parties. After You Submit the Contribution, it may be included in the Material.

Copyright (c) 2012, iFixit
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
mysql> drop tables states;
ERROR 1051 (42S02): Unknown table 'states'
mysql> create table states(i int) engine=innodb;
ERROR 1005 (HY000): Can't create table 'cart.states' (errno: -1)
110803 16:44:41 InnoDB: Error creating file './cart/states.ibd'.
110803 16:44:41 InnoDB: Operating system error number 17 in a file operation.
InnoDB: Error number 17 means 'File exists'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
@xiongchiamiov
xiongchiamiov / shell.py
Created July 11, 2011 22:15
Run `command` through the shell and return a tuple of the return code and the output.
from subprocess import PIPE, Popen, STDOUT
class ShellError(Exception):
def __init__(self, command, returnCode, output):
self.command = command
self.returnCode = returnCode
self.output = output
def __str__(self):
return '''Command '%s' exited with non-zero exit code %s.