Skip to content

Instantly share code, notes, and snippets.

View thomasvm's full-sized avatar

Thomas Van Machelen thomasvm

  • hoplr.com
  • Merelbeke
View GitHub Profile
@woods
woods / git_svn_bash_prompt.sh
Created December 4, 2008 15:37 — forked from halbtuerke/gist:31934
Set color bash prompt according to git/svn branch, and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@mattkruskamp
mattkruskamp / RequiredIfAttribute.cs
Created January 1, 2012 12:20
Asp.Net JQuery Unobtrusive Conditional Validation
public class RequiredIfAttribute : ValidationAttribute, IClientValidatable
{
private RequiredAttribute _innerAttribute = new RequiredAttribute();
public string DependentProperty { get; set; }
public object TargetValue { get; set; }
public RequiredIfAttribute(string dependentProperty, object targetValue)
{
this.DependentProperty = dependentProperty;
@dwdii
dwdii / PreBuildEvt_IncAndroidManifestVersion.ps1
Created April 28, 2012 02:45
Mono Android Auto-Increment Manifest Version using PowerShell
param
(
[string] $ProjectPath = "C:\SourceCode\TestApps\AndroidTestIt\AndroidTestIt"
)
process
{
# Load the bootstrap file
[xml] $xam = Get-Content -Path ($ProjectPath + "\Properties\AndroidManifest.xml")
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@learncodeacademy
learncodeacademy / flightplan-deploy.md
Last active January 7, 2024 11:58
Deploy Node.js Apps with Flightplan

##Setup your server (this would ideally be done with automated provisioning)

  • add a deploy user with password-less ssh see this gist
  • install forever npm install -g forever

##Install flightplan

  • npm install -g flightplan
  • in your project folder npm install flightplan --save-dev
  • create a flightplan.js file