Skip to content

Instantly share code, notes, and snippets.

@dastanko
dastanko / runner.py
Created December 7, 2013 18:59 — forked from carljm/runner.py
"""
An alternative Django ``TEST_RUNNER`` which uses unittest2 test discovery from
a base path specified in settings, rather than requiring all tests to be in
``tests`` module of an app.
If you just run ``./manage.py test``, it'll discover and run all tests
underneath the ``TEST_DISCOVERY_ROOT`` setting (a path). If you run
``./manage.py test full.dotted.path.to.test_module``, it'll run the tests in
that module (you can also pass multiple modules).
#/usr/bin/perl
use strict;
use LWP::Simple qw(getstore);
use LWP::UserAgent;
use HTTP::Cookies;
use Getopt::Long;
my $DIR_TO_SAVE = 'VKplaylist';
my ($cfile, $file, $exclude, $login, $pass, $cookie, $browser, $response, @links, @files, $num, $artist, $title, @excludes, @excluded);
$cfile = 'cookie.dat';
@dastanko
dastanko / Boxstarter
Last active August 29, 2015 14:11 — forked from mwrock/Boxstarter
function Exists-Drive {
param($driveletter)
(New-Object System.IO.DriveInfo($driveletter)).DriveType -ne 'NoRootDirectory'
}
function Create-Directories {
param($drive)
foreach($directory in $directories){
Write-Host "$($drive)$($directory)"
@dastanko
dastanko / ruby_rails_windows.md
Last active September 2, 2015 11:30 — forked from KelseyDH/ruby_rails_windows.md
Ruby on Rails Microsoft Windows Troubleshooting Tips

##Ruby on Rails Windows Troubleshooting Tips & Survival Guide

###Intro/Overview

The Ruby on Rails Windows Troubleshooting tips & Survival Guide is a random catalogue of issues I faced working with Ruby on Rails on Windows (Windows 7 specifically). This guide is not exhaustive, but covers many of the challenges that causes Windows Ruby developers to jump ship to Linux or Mac. If you're reading this guide then you're probably new to Ruby/Rails, so also included is more general beginner advice to help you get going.

####Personal Side Note

Before you follow this guide, I strongly recommend you consider using Linux or Mac OS X for Ruby Development instead. Reckless, and looking to prove a point; I ignored this strongly given advice while learning Ruby/Rails at a coding bootcamp. While I eventually did succeeed in getting Ruby on Rails to work in Windows, it was not easy, and I easily lost 40+ hours on StackOverFlow to Windows/Ruby configuration issues--time I could have devoted to lear