Skip to content

Instantly share code, notes, and snippets.

@artdrozdov
artdrozdov / dev-env-install
Last active August 29, 2015 14:19
DevEnv install using Chocolatey
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
Break
}
Write-Host "Hi Art! I will install your working environment."
$answer = Read-Host "Continue? (y/n)"
if($answer -eq "y"){
Write-Host "Processing..."
@jonspeicher
jonspeicher / gist:285486
Created January 24, 2010 22:30
Add colored status to your bash prompt while in a Mercurial repo.
# Define a few colors for later use. The escaped brackets tell bash that they
# are non-printable and keep word-wrapping sane.
TXT_RED='\['`tput setaf 1`'\]'
TXT_GREEN='\['`tput setaf 2`'\]'
TXT_RESET='\['`tput sgr0`'\]'
# Build a prompt decorator if we're in a hg repo. The branch name is included
# in green if the branch is default, red otherwise. A symbol appears if the
# working directory is not clean. This uses Steve Losh's excellent hg-prompt
@dvhthomas
dvhthomas / Markdown.sublime-build
Created May 3, 2011 22:58
Pandoc powered Sublime Text 2 build provider for Markdown files: HTML the easy way
{
"cmd": ["pandoc.exe", "--to=html", "--output=$file.html", "$file"],
"selector": "source.md"
}
@ferventcoder
ferventcoder / RoundhousEMigrate.cs
Created May 18, 2011 04:28
RoundhousE - Migrations with new semi-fluent interface
new Migrate().Set(p =>
{
p.ConnectionString = connectionString;
p.SqlFilesDirectory = scriptsLocation;
p.EnvironmentName = environmentName;
p.Drop = dropDatabase;
p.RecoveryModeSimple = useSimpleRecoveryMode;
p.Restore = restore;
p.RestoreFromPath = restorePath;
p.RepositoryPath = repositoryPath;
@derekgreer
derekgreer / findDeadProjects.sh
Created November 1, 2011 23:39
Bash script to find dead projects
#!/bin/bash
declare -a SOLUTIONS=$(find . -name "*.sln")
declare -a PROJECTS=$(find . -name "*.csproj")
for PROJECT in ${PROJECTS[*]}
do
PROJECT_NAME=$(basename $PROJECT)
USED=0
@msluyter
msluyter / gist:1925069
Created February 27, 2012 16:22
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@rnystrom
rnystrom / Iphone Icon.png Bash Script
Created April 5, 2012 15:04 — forked from jessedc/iOS Icon.png bash script
A simple bash script using OSX command line tool sips to resample a 512x512px image
#!/bin/zsh
# Compatible with bash, just change "zsh" to "bash"
# First param: The folder that the original file is stored in
# Second param: The original image name
sips --resampleWidth 512 "${1}/${2}" --out "${1}/iTunesArtwork"
sips --resampleWidth 57 "${1}/${2}" --out "${1}/Icon.png"
sips --resampleWidth 114 "${1}/${2}" --out "${1}/Icon@2x.png"
sips --resampleWidth 29 "${1}/${2}" --out "${1}/Icon-Small.png"
sips --resampleWidth 58 "${1}/${2}" --out "${1}/Icon-Small@2x.png"
@nathansmith
nathansmith / this-is-madness.css
Last active October 6, 2015 10:36
Examples of CSS selector strength.
* {}
tag {}
[attribute] {}
[attribute="value"] {}
.class {}
@TooTallNate
TooTallNate / README.md
Last active October 8, 2015 18:38
Forward port 80 traffic from 127.0.0.1 to port 3000 at bootup on OS X

Copy this file to: /Library/LaunchDaemons/fwd-80-to-3000.plist and then reboot:

$ sudo -s
$ curl -L https://gist.github.com/TooTallNate/3372589/raw/ace6451e9e47f59550f12d09cb924a64531cfd1f/fwd-80-to-3000.plist > /Library/LaunchDaemons/fwd-80-to-3000.plist
$ reboot
anonymous
anonymous / index.html
Created March 26, 2013 15:55
A CodePen by Antonis Kamamis. Web Audio API experiment - Best viewed in full view and latest chrome This is a Webkit only experiment with Web audio API. The idea came from my After Effects days and this video from Red Giant TV(http://www.redgiantsoftware.com/videos/redgianttv/item/54/) ; In short its animating particles depending on the frequenc…
<canvas class="c"></canvas>