Skip to content

Instantly share code, notes, and snippets.

View modulexcite's full-sized avatar
🎯
Focusing

modulexcite

🎯
Focusing
View GitHub Profile
Set AppObj = CreateObject("Shell.Application")
If WScript.Arguments.Length=1 Then
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"" -d """ & WScript.Arguments(0) & """"
Else
AppObj.ShellExecute "C:\Console2\Console.exe", " -t ""Git Bash"""
End If
powershell -NoExit -Command ". (Resolve-Path \"$env:LOCALAPPDATA\GitHub\shell.ps1\"); . (Resolve-Path \"$env:github_posh_git\profile.example.ps1\")"

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@modulexcite
modulexcite / .gitignore
Last active August 29, 2015 14:23 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
/**
* Campfire plugin for the uptime project - https://github.com/fzaninotto/uptime
*
* This index.js files goes to a directory `plugins/campfire` in your installation of uptime.
*
* Notifies all events (up, down, paused, restarted) to campfire
*
* This plugin has a dependency on `ranger`.
* Add this to the "dependencies" object in your `package.json` file :
*
@modulexcite
modulexcite / index.js
Last active August 29, 2015 14:23 — forked from xphyr/index.js
/**
* Pushover plugin for the uptime project - https://github.com/fzaninotto/uptime
* Thanks to DMathieu for the Campfire plugin which I basically hacked up to make this
* work: https://gist.github.com/dmathieu/5592418
*
* This index.js files goes to a directory `plugins/pushover` in your installation of uptime.
*
* Notifies all events (up, down, paused, restarted) to pushover
*
* This plugin has a dependency on `pushover-notifications`.

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
@modulexcite
modulexcite / linq.js
Last active August 29, 2015 14:23 — forked from rushfrisby/linq.js
/*--------------------------------------------------------------------------
* linq.js - LINQ for JavaScript
* ver 2.2.0.2 (Jan. 21th, 2011)
*
* created and maintained by neuecc <ils@neue.cc>
* licensed under Microsoft Public License(Ms-PL)
* http://neue.cc/
* http://linqjs.codeplex.com/
*--------------------------------------------------------------------------*/
function ExecuteRules(data)
{
(function Rule004596ed979540878bc366521663501d(data)
{
var sw004596ed979540878bc366521663501d = new Stopwatch();
sw004596ed979540878bc366521663501d.Start();
var result004596ed979540878bc366521663501d = new Result();
result004596ed979540878bc366521663501d.RuleId = Guid.Parse("004596ed-9795-4087-8bc3-66521663501d");
//do this once and cache it
var ruleEngineTypes = new Dictionary<LanguageTypes, Type>();
ruleEngineTypes.Add(LanguageTypes.CSharp, typeof(CSharpRuleEngine));
ruleEngineTypes.Add(LanguageTypes.Python, typeof(PythonRuleEngine));
ruleEngineTypes.Add(LanguageTypes.JavaScript, typeof(JavaScriptRuleEngine));
//switch turns into this...
var ruleEngineType = ruleEngineTypes[policy.LanguageType];
var engine = (IRuleEngine)Activator.CreateInstance(ruleEngineType);
engine.Execute(plan);