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 | |
### VARIABLES ### | |
PRE_PACK="openssl-devel pcre-devel make gcc" | |
VER="1.5-dev22" | |
# Setup Colours | |
black='\E[30;40m' | |
red='\E[31;40m' |
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
public static class StringHelper | |
{ | |
public static byte[] ToByteArray(this string str) | |
{ | |
byte[] bytes = new byte[str.Length * sizeof(char)]; | |
System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length); | |
return bytes; | |
} | |
public static string GetString(this byte[] bytes) |
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
{ | |
"vrmdates": [ | |
{ | |
"y": 1983, | |
"m": 1, | |
"ident": "Y" | |
}, | |
{ | |
"y": 1983, | |
"m": 8, |
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; | |
public static class UnixUtils | |
{ | |
public static DateTime FromUnixTimeStamp(this Int64 unixTimestamp) | |
{ | |
return new DateTime(1970, 1, 1).AddMilliseconds(unixTimestamp); | |
} | |
public static Int64 ToUnixTimeStamp(this DateTime date) |
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 | |
### VARIABLES ### | |
PRE_PACK="gcc gcc-c++ make pcre-devel zlib-devel unzip wget" | |
OPT_PACK="openssl-devel" | |
VER="1.5.12" | |
PREV_VER="1.5.11" | |
USER="nginx" | |
GROUP="nginx" | |
INSTALL_DIR="/etc/nginx" |
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
cd ~ | |
sudo yum -y install java-1.7.0-openjdk | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.zip | |
unzip elasticsearch-0.90.1.zip | |
rm -rf elasticsearch-0.90.1.zip | |
mv elasticsearch-0.90.1 elasticsearch | |
sudo mv elasticsearch /usr/local/share | |
cd /usr/local/share |
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.Collections.Specialized; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Moq; | |
/// <summary> | |
/// This helper class can be used to set up Moq mocks of MVC3 controllers. | |
/// Slightly modified from the original version from Scott Hanselman's blog: |
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
public static class MvcMockHelpers | |
{ | |
public static HttpContextBase FakeHttpContext() | |
{ | |
var context = new Mock<HttpContextBase>(); | |
var request = new Mock<HttpRequestBase>(); | |
var response = new Mock<HttpResponseBase>(); | |
var session = new Mock<HttpSessionStateBase>(); | |
var server = new Mock<HttpServerUtilityBase>(); |
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.Net; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Amazon; | |
using Amazon.S3; | |
using Amazon.S3.Model; | |
public static class AmazonS3Extensions |
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 /p delBuild=Enter the release number (without the v)? | |
git flow release start v%delBuild% && git flow release publish v%delBuild% && git flow release finish v%delBuild% && git push | |
git checkout develop | |
echo "Completed, you're now back on develop" | |
pause |