Skip to content

Instantly share code, notes, and snippets.

View m-wynn's full-sized avatar
🐧

Matthew Wynn m-wynn

🐧
View GitHub Profile
@m-wynn
m-wynn / gist:2d1444021e3cc535a731
Created January 24, 2015 05:18
cv_config vagrant up
TASK: [base | Install python-pycurl for apt_repository] ***********************
failed: [vm-f] => {"failed": true}
stderr: Failed to fetch http://security.debian.org/pool/updates/main/c/curl/libcurl3-gnutls_7.26.0-1+wheezy10_amd64.deb Could not resolve 'security.d
ebian.org'
Failed to fetch http://mirrors.kernel.org/debian/pool/main/p/pycurl/python-pycurl_7.19.0-5_amd64.deb Could not resolve 'mirrors.kernel.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
stdout: Reading package lists...
Building dependency tree...
Reading state information...
/file/
npm-debug.log
include/setting/server.sett.php
root@MJO:/opt/bin# ls -lah | grep bash
-rwxr-xr-x 1 root root 719.4K Mar 23 2013 bash
lrwxrwxrwx 1 root root 4 Feb 6 07:51 rbash -> bash
root@MJO:/opt/bin# ./bash
-sh: ./bash: not found
root@MJO:/opt/bin# /opt/bin/bash
-sh: /opt/bin/bash: not found
Failed to open BO for returned DRI2 buffer (1366x768, dri2 back buffer, named 11).
This is likely a bug in the X Server that will lead to a crash soon.
[1] 5527 segmentation fault (core dumped) mpv
@m-wynn
m-wynn / canasta.desktop
Last active August 29, 2015 14:28
Canasta Desktop File
[Desktop Entry]
Version=1.0
Type=Application
Name=Canasta
Exec=cd /home/wynnfamily/canasta-0.2.5 && python Canasty.py
Icon=/optional/path/to/icon
Categories=Game;
@m-wynn
m-wynn / add-remote.zsh
Created September 4, 2015 02:00
use this
#!/bin/zsh
add-remote() {
local name="$1"
local remote="$(git config --get remote.origin.url)"
local current="$(echo "$remote" | sed -e 's/.*github.com\://' -e 's/\/.*//')"
local url="${remote/$current/$name}"
git remote add "$name" "$url"
}
@m-wynn
m-wynn / listings.vim
Created September 27, 2015 19:37
Uniform listings syntax highlighting
syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>"
syn region texZone start="\\lstinputlisting" end="{\s*[a-zA-Z/.0-9_^]\+\s*}"
syn match texInputFile "\\lstinline\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
" http://stackoverflow.com/a/21651323/3483296
" This goes in ~/.vim/after/syntax/tex/listings.vim
@m-wynn
m-wynn / zshrc
Created October 5, 2015 06:43
colors everywhere
GRC=`which grc`
if [ "$TERM" != dumb ] && [ -n GRC ]
then
alias colorize="$GRC -es --colour=auto"
for c in as c++ configure cvs df diff dig esperanto gas gcc g++ ld ldapadd ldapauth ldapdelete ldapmodify ldapmodrdn ldappassd ldapsearch ldapwhoami last make mount netstat ping php ps proftpd traceroute wdiff; do
alias ${c}="colorize ${c}"
done
fi
@m-wynn
m-wynn / PrintATree.java
Created October 19, 2015 02:08
Prints a tree very pretty
/* Strongly Inspired By
* http://stackoverflow.com/questions/4965335/how-to-print-binary-tree-diagram
*/
public void fancyPrint(){
int maxLevel = maxHeight(root);
nodePrinter(Collections.singletonList(root), 1, maxLevel);
}
private void nodePrinter(List<Node<E>> nodes, int level, int maxLevel){
@m-wynn
m-wynn / vim.desktop
Created November 19, 2015 09:51
vim+awesome+xdg
[Desktop Entry]
Version=1.0
Name=Vim
GenericName=Best Text Editor
Comment=Not Emacs
Exec=sh -c "tmux new-window -t default; tmux send-keys -t default 'vim %U' Enter; echo 'local awful = require(\"awful\") ; return awful.tag.viewonly(tags[1][5])' | awesome-client"
Icon=vim
Terminal=false
Type=Application
MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-c;text/x-objc;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-php;text/x-php-source;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text