This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| build does require( | |
| @"psr\struct.pxs", | |
| @"psr\console.pxs", | |
| @"psr\csp.pxs", | |
| @"psr\queue.pxs", | |
| ); | |
| function create_tracer() { | |
| chans( | |
| var shutdown_c, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Position=0)] | |
| $Item, | |
| [Switch] $WhatIf, | |
| [String] $AppConfig = "$env:HOMEDRIVE$env:HOMEPATH\AppConfig", | |
| [String] $BaseDir = ".", | |
| [Parameter(ParameterSetName="register")] | |
| [Switch] | |
| $Register, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * matrix.c - Matrix computations that has been optimized by the students | |
| * | |
| * Copyright (c) 2011 Christian Klauser, All rights reserved | |
| * Author: Christian Klauser <[email protected]>, | |
| * | |
| * I used comparatively simple algorithms for both LU-decomposition | |
| * and the matrix multiplication involved in checking for equality. | |
| * - My LU decomposition is based on Gaussian Elimination | |
| * - No pivoting, will fail for pivots that are == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en"> | |
| <siteinfo> | |
| <sitename>Wikipedia</sitename> | |
| <base>http://en.wikipedia.org/wiki/Main_Page</base> | |
| <generator>MediaWiki 1.20wmf12</generator> | |
| <case>first-letter</case> | |
| <namespaces> | |
| <namespace key="-2" case="first-letter">Media</namespace> | |
| <namespace key="-1" case="first-letter">Special</namespace> | |
| <namespace key="0" case="first-letter" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY | |
| export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY | |
| export PASSPHRASE=YOU_PASSHRASE | |
| # directories, space separated | |
| SOURCE="/home/thomas/backup /home/thomas/bin /home/thomas/documents" | |
| BUCKET=s3+http://mybucket | |
| LOGFILE=/home/thomas/tmp/duplicity.log | |
| # set email to receive a backup report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
| lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
| lg = !"git lg1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Proof-of-concept XorLinkedList | |
| // Mostly untested! Do not use in serious code! | |
| // NO WARRANTIES AT ALL! | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _fill_in() { | |
| perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : "\${$1}"/eg' "${1}" | |
| } | |
| # usage | |
| export MY_VAR=15 | |
| _fill_in "my_file.tmpl" > "my_file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Simple form | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| # More correct/robust form, if you have time | |
| SOURCE="${BASH_SOURCE[0]}" | |
| while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
| DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
| SOURCE="$(readlink "$SOURCE")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Bash function that calls `less` and `ls -l` depending on whether | |
| # the target is a file or a directory. Surprisingly pleasant to use. | |
| function lk { | |
| local p | |
| if [[ $# -lt 1 ]] ; then | |
| p='.' | |
| else | |
| p="$1" | |
| fi |
OlderNewer