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
#!/bin/bash | |
set -uex | |
cd /tmp | |
# Heroku revision. Must match in 'compile' program. | |
# | |
# Affixed to all vendored binary output to represent changes to the | |
# compilation environment without a change to the upstream version, | |
# e.g. PHP 5.3.27 without, and then subsequently with, libmcrypt. | |
heroku_rev='-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
:: Stop IIS | |
PsExec.exe \\LDNSERV01 -s -i C:\windows\system32\inetsrv\appcmd.exe stop site OnlineXCart | |
:: Recycle App Pool (removes lock on file system) | |
PsExec.exe \\LDNSERV01 -s -i C:\windows\system32\inetsrv\appcmd.exe recycle apppool OnlineXCart | |
:: Wait 4 Seconds | |
:: This is useful if you have a command straight after that executes file operations on IIS App Directory | |
ping -n 5 127.0.0.1 > nul |
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
@if (1==1) @if(1==0) @ELSE | |
@echo off | |
@SETLOCAL ENABLEEXTENSIONS | |
:: CHECK IF WE NEED TO MODIFY PATH | |
ECHO ;%PATH%; | find /C /I ";%~dp0tools\phantomjs;" > NUL | |
IF %ERRORLEVEL% GTR 0 ( | |
ECHO Adding phantom and casper to PATH | |
SET "path=%path%;%~dp0tools\phantomjs;%~dp0tools\casperjs\batchbin" | |
) | |
:: EXECUTE AFTER REPARSING BATCH INPUT |
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
@ECHO OFF | |
SET targetdir=%~dp0 | |
SET CLASSPATH=%CLASSPATH%;%~dp0tools\lib;%~dp0\tools\apache-ant-1.9.2\lib\ant-launcher.jar | |
ECHO java -Dant.home=tools\apache-ant-1.9.2 org.apache.tools.ant.launch.Launcher -f "%~dp0tools\run-tests.xml" | |
java -Dant.home=tools\apache-ant-1.9.2 org.apache.tools.ant.launch.Launcher -f "%~dp0tools\run-tests.xml" |
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
:: 1) Connect to remote server | |
net use \\fileserver\packages\myproject | |
:: 2) Backup previous package | |
move /y "\\fileserver\packages\myproject\prod\${APP_VERSION}\" "\\fileserver\packages\myproject\prod\${APP_VERSION}.#${releasetag}" | |
if %%errorlevel%% GEQ 1 goto filenotfound | |
goto okay | |
:: 3) Ignore errors | |
:filenotfound |
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; | |
using System.IO; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Security.Cryptography; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Net; | |
using System.Web; |
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
<?xml version="1.0"?> | |
<project name="MyProject" default="test-all" basedir="."> | |
<description> | |
******************************************** | |
nant.check-version.xml | |
******************************************** | |
By: Steven de Salas | |
On: November 2015 |
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
/* | |
* Queue.h | |
* | |
* Defines a templated (generic) class for a queue of things. | |
* Handy for arduino projects, just #include "Queue.h"; and this file. | |
* | |
* Example Use: | |
* | |
* Queue<char> queue(10); // Max 10 chars in this queue | |
* queue.push('H'); |
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
String.prototype.hashCode = function(){ | |
var hash = 0; | |
if (this.length == 0) return hash; | |
for (var i = 0; i < this.length; i++) { | |
char = this.charCodeAt(i); | |
hash = ((hash<<5)-hash)+char; | |
hash = hash & hash; // Convert to 32bit integer | |
} | |
return hash; | |
} |
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
// @see https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens | |
// ======================= | |
// get the packages we need ============ | |
// ======================= | |
var express = require('express'); | |
var app = express(); | |
var bodyParser = require('body-parser'); | |
var morgan = require('morgan'); | |
var mongoose = require('mongoose'); |
OlderNewer