We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
| #!/usr/bin/env ocaml | |
| (* | |
| Prerequisites: Findlib, Pcre, Cryptokit | |
| Usage: openssl rsa -in privkey.pem -text | ./pem2ck.ml > privkey.cryptokit | |
| *) | |
| #use "topfind" ;; | |
| #require "pcre" ;; | |
| #require "cryptokit" ;; |
| # A quick and dirty plugin for Jekyll by Eli Naeher | |
| # | |
| # This plugin creates a site.years template variable which allow you to group archive links by year and month. | |
| # The structure of site.years is: | |
| # site.years = 2001=>[[post1, post2...], [...]], 2002=>[...] | |
| # | |
| # Usage should look something like this: | |
| # {% for year in site.years %} | |
| # <h2>Year {{ year.first.first.date | date: "%Y" }}</h2> |
| MBA-FBA:bin francois$ ./virt-manager | |
| RuntimeWarning: tp_compare didn't return -1 or -2 for exception | |
| RuntimeWarning: tp_compare didn't return -1 or -2 for exception | |
| Traceback (most recent call last): | |
| File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 393, in <module> | |
| _show_startup_error(str(run_e), "".join(traceback.format_exc())) | |
| File "/Users/francois/bin/mybuild/share/virt-manager/virt-manager.py", line 63, in _show_startup_error | |
| from virtManager.error import vmmErrorDialog | |
| File "/Users/francois/bin/mybuild/share/virt-manager/virtManager/error.py", line 173, in <module> | |
| class _errorDialog (gtk.MessageDialog): |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| #!/usr/bin/env bash | |
| # | |
| # This is sp, the command-line Spotify controller. It talks to a running | |
| # instance of the Spotify Linux client over dbus, providing an interface not | |
| # unlike mpc. | |
| # | |
| # Put differently, it allows you to control Spotify without leaving the comfort | |
| # of your command line, and without a custom client or Premium subscription. | |
| # |
| import collections | |
| from math import ceil | |
| from django.core.paginator import Page | |
| from django.core.cache import cache | |
| # To use the paginator, add the following to your admin class: | |
| # from myapp import CachingPaginator | |
| # | |
| # ... |
| /* | |
| This program is an adaptation of the Mandelbrot program | |
| from the Programming Rosetta Stone, see | |
| http://rosettacode.org/wiki/Mandelbrot_set | |
| Compile the program with: | |
| gcc -o mandelbrot -O4 mandelbrot.c | |
| Usage: |
| (* The Mandelbrot set. | |
| Compile with: | |
| ocamlbuild mandelbrot.native | |
| Example usage: | |
| ./mandelbrot.native --xmin 0.27085 --xmax 0.27100 --ymin 0.004640 --ymax 0.004810 --xres 1000 --maxiter 1024 --file pic.ppm |
| #!/usr/bin/env python3 | |
| # Copyright 2014 Matteo Bertini matteo@naufraghi.net | |
| # Released as Public Domain | |
| # | |
| # Latest version: | |
| # wget http://slug.it/backup-google-authenticator.py | |
| # | |
| # Requirements | |
| # ============ | |
| # |