{{ message }}

Instantly share code, notes, and snippets.

# Peter Vasilptrv

Created Nov 17, 2012
Simple force directed graph drawing algorithm
View spring.py
 #!/usr/bin/env python # Force-Directed Graph Drawing import Tkinter import random import math # d = [ # [.0, .3, .3, .0],
Created Jan 20, 2013
ctags language support for latex and bibtex
View .ctags.txt
 --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/
Created Sep 10, 2012
SuperCollider examples
View sc_examples.scd
 // SuperCollider Examples //boot server s.boot; // SC as system for sound synthesis and sound processing // patching synth moduls by writing synth defs:
Last active Dec 29, 2019
Flycheck syntax checker for Lua using luacheck
View flycheck-luacheck.el
 ;;; flycheck-luacheck.el --- Flycheck syntax checker using luacheck -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Peter Vasil ;; Author: Peter Vasil ;; 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
Created Feb 5, 2011
Change track names in GPX files (python)
View GpxTrackNameChanger.py
 #!/usr/bin/python # Script for assigning the date of a track in a GPX file as track name. # # Usage e.g \$ python ChangeGpxTrackName.py source.gpx target.gpx" # # Peter Vasil # Date: 2011-02-05 from optparse import OptionParser
Last active Oct 8, 2019
SpatiaLite example in Go
View spatialite_example.go
 package main import ( "database/sql" "github.com/mattn/go-sqlite3" "log" "os" ) func runQuery(db *sql.DB, query string) {
Last active Sep 5, 2019
lldb-gud patch from llvm.org for emacs 24.4
View lldb-gud-emacs-24.patch
 diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index e2d996f..d1458a2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -34,7 +34,7 @@ ;; and added a menu. Brian D. Carlstrom combined the IRIX ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories. ;; Derek L. Davies added support for jdb (Java -;; debugger.) +;; debugger). llvm.org added support for lldb.
Last active Oct 17, 2017
lldb-gud patch from llvm.org for emacs 25
View lldb-gud-emacs-25.patch
 diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 42c5b20..0f6f412 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -35,7 +35,7 @@ ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories. ;; Derek L. Davies added support for jdb (Java ;; debugger.) Jan Nieuwenhuizen added support for the Guile REPL (Guile -;; debugger). +;; debugger). llvm.org added support for lldb.
Created Jul 30, 2017
View fish_prompt.fish
 set normal (set_color normal) set magenta (set_color magenta) set yellow (set_color yellow) set green (set_color green) set red (set_color red) set gray (set_color -o black) # Fish git prompt set __fish_git_prompt_showdirtystate 'yes' set __fish_git_prompt_showstashstate 'yes'
Created Jul 18, 2011
satellite_sound experiments
View satellites_alt.scd
 //http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Level-meter-disappearing-td2714612.html ( SynthDef(\bell, { |amp = 0.1, out = 0, azim=30, elev=1,id=10,noisy=22| var freq = id.linexp(1,30,200,800); var vol_id = id.linlin(1,20,0.6,0.3); // var xVal = noisy.linexp(0, 50, 1000, 10000); // var yVal = elev.linexp(0, 40, 1000, 10000);
You can’t perform that action at this time.