Skip to content

Instantly share code, notes, and snippets.

;;; flycheck-go-alt.el --- Go syntax checkers for flycheck
;; Copyright (C) 2013 ptrv <[email protected]>
;; Author: ptrv <[email protected]>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
(flycheck-declare-checker c++-cpplint
"A cpp syntax checker using the cpplint.py tool.
See URL `https://code.google.com/p/google-styleguide/'."
:command '("cpplint.py" "--verbose=3" source-original)
:error-patterns '(("^\\(?1:.*\\):\\(?2:.*\\): \\(?4:.*\\)$" warning))
:modes 'c++-mode)
;;; flycheck-go.el --- Go syntax checker for flycheck
;; Copyright (C) 2013 ptrv <[email protected]>
;; Author: ptrv <[email protected]>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@ptrv
ptrv / gpx2iannix.py
Created February 13, 2013 04:31
Send a gpx file to IanniX
#!/usr/bin/env python
try:
import OSC
except ImportError:
print """
Please install pyOSC from the following location:
https://trac.v2.nl/wiki/pyOSC
"""
@ptrv
ptrv / .ctags.txt
Created January 20, 2013 01:41
ctags language support for latex and bibtex
--langdef=latex
--langmap=latex:.tex .latex
--regex-latex=/^\\part[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/PART \2/s,part/
--regex-latex=/^\\part[[:space:]]*\*[[:space:]]*\{([^}]+)\}/PART \1/s,part/
--regex-latex=/^\\chapter[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/CHAP \2/s,chapter/
--regex-latex=/^\\chapter[[:space:]]*\*[[:space:]]*\{([^}]+)\}/CHAP \1/s,chapter/
--regex-latex=/^\\section[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\2/s,section/
--regex-latex=/^\\section[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\1/s,section/
--regex-latex=/^\\subsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/-\2/s,subsection/
--regex-latex=/^\\subsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/-\1/s,subsection/
@ptrv
ptrv / 10_tint2_workaround.sh
Created January 12, 2013 16:59
Workaround to restart tint2 after suspend
#!/bin/sh
# tint2 restart for x-p-m bug
#
# put this file to /etc/pm/sleep.d/
USER=$(who | grep pts\/0| awk '{print $1}')
case "$1" in
hibernate|suspend)
;;
@ptrv
ptrv / get_number_of_cpus
Last active December 11, 2015 00:38
Get the number of cpus in the shell
grep -c 'model name' /proc/cpuinfo
@ptrv
ptrv / emacsclient.desktop
Created December 21, 2012 09:55
Ubuntu emacsclient launcher
[Desktop Entry]
Name=Emacs
Comment=GNU Emacs Client
Exec=/usr/bin/emacsclient -c -a emacs24 %F
TryExec=emacs24
Icon=emacs2
Terminal=false
Type=Application
StartupNotify=true
@ptrv
ptrv / gpsrecorddaychart.pde
Created December 17, 2012 11:21
gps chart drawing (dan)
String[] lines;
int dataLength=48;
int stepX;
int stepY;
color c;
void setup(){
size(512, 512);