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
| ## | |
| ## Compile the .less files into .css | |
| ## | |
| def to_win(file) | |
| file.gsub(%r{/}) { "\\" } | |
| end | |
| def to_unix(file) | |
| file.gsub(%r{\\}) { "/" } |
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
| # find who added C# Tests in Test Directories, ordered by date | |
| git ls-tree --name-only -z -r HEAD| egrep -i -z -Z -E '(Tests\..*\.*cs)$' | xargs -0 -n1 git blame --show-name -w | grep "\[Test" | grep -v TestFixture | perl -pe 's/^[^\(]+\((\w+\s*\w*)\s+(\d{4}-\d{2}-\d{2}).*/$2 $1/' | sort -n | |
| # find who added JS Specs, ordered by date | |
| git ls-tree --name-only -z -r HEAD| egrep -i -z -Z -E '(\.spec\.js)$' | xargs -0 -n1 git blame --show-name -w | grep "it\(" | perl -pe 's/^[^\(]+\((\w+\s*\w*)\s+(\d{4}-\d{2}-\d{2}).*/$2 $1/' | sort -n |
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
| using System; | |
| using System.Text; | |
| namespace BridgeCanada.Utils.Csv | |
| { | |
| /// <summary> | |
| /// Summary description for CsvFormatter. | |
| /// </summary> | |
| public class CsvFormatter | |
| { |
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 | |
| PIDMOTION=$(pgrep -x motion) | |
| if [ -n "$PIDMOTION" ] | |
| then | |
| echo "stopping motion" | |
| sudo /etc/init.d/motion stop | |
| fi | |
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 | |
| find ./ -name '*.jpg' -exec convert -resize 1900x1425 -interlace Plane -quality 50% \{\} ../motion/\{\}.jpg \; |
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/sh | |
| # based on http://stackoverflow.com/questions/9998710/can-it-possible-to-send-mails-by-bash-script-via-smtp#answer-10001357 | |
| # example: | |
| # | |
| # $ ./bashmail.sh -h=smtp.example.com \ | |
| # -s="My Subject" \ | |
| # -t=me@example.com \ | |
| # -f=you@example.com \ | |
| # -z="My Name" \ |
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
| import javax.xml.bind.DatatypeConverter | |
| /** | |
| * Implicit conversions and helpers for the Coursera crypto course, | |
| * mainly to extend String types so they can be used as hex strings | |
| * | |
| * ==Usage== | |
| * | |
| * {{{ | |
| * import HexConversions._ |
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
| public static void main(String[] args){ | |
| System.out.println("Hello World"); | |
| } |
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
| // Adapted from https://github.com/ThomasLengeling/KinectPV2/blob/master/KinectPV2/examples/PointCloudDepth/PointCloudDepth.pde | |
| KinectPV2 kinect; | |
| int maxD = 4500; // 4.5m | |
| int minD = 0; // 50cm | |
| void setup() { | |
| size(1024, 424, P3D); | |
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
| using System; | |
| using System.Diagnostics.CodeAnalysis; | |
| using Akka.Actor; | |
| using EchoAPI.Messages; | |
| using Microsoft.AspNet.SignalR.Owin; | |
| namespace EchoAPI.Hub | |
| { | |
| [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] | |
| public class EchoHub : Microsoft.AspNet.SignalR.Hub |