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
| // https://class.coursera.org/compartsprocessing-001/human_grading/view/courses/972068/assessments/3/submissions | |
| // | |
| // In this assignment, you must produce an original sketch containing at least 20 distinct objects of at least 2 kinds of shapes. | |
| // Each object must be unique, in shape (ellipse, rect, etc), or in color, or in size. | |
| // Although shapes must be visible on your canvas, you may include objects which are partially out of view. | |
| // Additionally, you must include a 2 sentence (minimum) description of your artistic intent/goal for your assignment. | |
| // This sketch contains two areas painted with rectangles of technically | |
| // identical colors and transparency, but diminishing size, such that | |
| // subsequent applications build from a dark tint of the background, to a |
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
| -- Michael Paulukonis 2014 | |
| -- notes @ http://www.xradiograph.com/Programming/SQL | |
| -- adapted from http://sqlanywhere.blogspot.com/2011/06/installing-sql-server-database-from-bak.html | |
| -- ASSUMES the BAK file and dest db have the same names | |
| -- step2 needs to pull the logical names out of the .bak file | |
| -- original version scripted a DROP of existing table | |
| -- I've removed it from here, in order to force a manual backup-vs-delete decision |
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
| /* Traditionally, text and image are segregated in Western Art. | |
| This sketch plays with those boundaries, providing an polychromatic | |
| text painting environment. | |
| Mouse click and drag to paint (previous paints will fade slightly). | |
| Color and size are based on mouse position. | |
| Space to paint without fading previous actions. | |
| RIGHT/LEFT to increase/decrease rotation of letters. | |
| R to reset rotation to 0. | |
| UP/DOWN to change paint mode. |
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.Runtime.CompilerServices; | |
| using System.Diagnostics; | |
| using log4net; | |
| // TODO: you must move the below configuration call. | |
| // It must be executed prior to any calls to Logger | |
| // Application_Start or summat | |
| log4net.Config.XmlConfigurator.Configure(); | |
| public class CustomError |
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
| $ErrorActionPreference="Stop" | |
| if ($args.Count -le 2) | |
| { | |
| throw "Usage: <server name> <db name> <script file>" | |
| } | |
| $servername = $args[0] | |
| $database = $args[1] | |
| $sourcefile = $args[2] |
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
| var getDateFormatted = function() { | |
| var d = new Date(); | |
| var df = d.getFullYear() + '.' + pad((d.getMonth() + 1), 2) + '.' + pad(d.getDate(), 2); | |
| return df; | |
| }; | |
| var pad = function(nbr, width, fill) { | |
| fill = fill || '0'; | |
| nbr = nbr + ''; | |
| return nbr.length >= width ? nbr : new Array(width - nbr.length + 1).join(fill) + nbr; |
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
| $sourceDir = "\\path\to\source\" | |
| $destDir = "\\path\to\dest\" | |
| # NOTE: this WILL overwrite existing docs (unless open) | |
| Copy-Item $sourceDir*.docx $destDir | |
| # delete (hidden, leftover) office temp files | |
| # usually caused by killing processes | |
| Remove-Item ~*.docx -force |
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
| #Region "KeyboardHooks" | |
| ' mix of code found @ | |
| ' http://stackoverflow.com/a/10257266/41153 | |
| ' http://stackoverflow.com/questions/8120199/how-to-get-the-keypress-event-from-a-word-2010-addin-developed-in-c | |
| Friend Class KeyboardHooking | |
| ' Methods | |
| <DllImport("user32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _ | |
| Private Shared Function CallNextHookEx(ByVal hhk As IntPtr, ByVal nCode As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr | |
| End Function |
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
| :: open current directory in dired | |
| :: based on code from http://datko.net/2013/07/11/open-emacs-dired-buffer-from-dired/ | |
| :: save as "dired.bat" and save somewhere in PATH | |
| :: run "dired" from command-line to open current directory in emacs w/ dired | |
| emacsclient -e "(dired \"\")" |
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
| :: open file in emacs | |
| :: based on code from http://datko.net/2013/07/11/open-emacs-dired-buffer-from-dired/ | |
| :: save as "em.bat" and save somewhere in PATH | |
| :: run "em foo.bar" from command-line to open foo.bar in emacs | |
| emacsclientw -n %1 |
OlderNewer