This file contains 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 Moq; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace SuperImportantNamespace.Tests.Data | |
{ | |
public static class EntityFrameworkMockHelper |
This file contains 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 (!String.prototype.trim) { | |
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}; | |
} |
This file contains 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 function split_title($title,$maxStr) | |
{ | |
$newStr = Array(); | |
$maxLines=3; | |
$lineNum = 1; //to be line 1,2, or 3 | |
$split = explode ( " ", $title); | |
foreach($split as $str) | |
{ |
This file contains 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
var data = {}; | |
$(".form-selector").serializeArray().map(function(x){data[x.name] = x.value;}) |
This file contains 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
uploadImg: function(file, imgPreview, imgUrl) { | |
var self = this | |
console.log('file=', file) | |
imgPreview.html('<i class="icon-spinner icon-spin"></i>') | |
imgUrl.val('') | |
reader = new FileReader(); | |
reader.onload = (function(tFile) { | |
return function(evt, response) { |
This file contains 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 | |
USERNAME="" #github usr | |
PW="" #github pw | |
ROOT="/home/ben/websites" | |
DOAUTH ="" #digital ocean auth header | |
declare -a arr=("anticristum.com" "imaletyoufinish.com" "mariodonkeykong.com" "miamishark.com" "pacmanflash.com" "pandemicboy.com" "sushicat.org" "welcome.artoffx.com" "batmangame.org" "infectonator.com" "marioflash.org" "necronator.com" "pandemic1.com" "phagewars.com" "sydneyshark.net" "werebox.com" "belowsurfaceskincare.com" "crabbattle.com" "jacuzzijumper.com" "mariones.com" "pandemic2game.com" "rpgflash.com" "zombie3.com" "blosics.com" "embed.redditjs.com" "jigsawfree.net" "mariorom.com" "onlinegamescar.com" "pandemic2.info" "runjesus.com" "undeadend.com" "mario3.org" "mariotetris.com" "onslaught2.org" "pandemic2.org" "saucerstrike.com" "blosics.net" "eternalred.com" "mariocrossover2.com" "megamanflash.com" "originalpacman.com" "pandemic3.com" "bobulous.com" "goblanesh.com" "mariocrossover.com" "metroid2.com" "pacman.asia" "pandemic3.org" "supermariocrossover.com" "warcraftflas |
This file contains 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 void PerformSoapCall() { | |
using (var client = new SomeClient()) | |
using (new OperationContextScope(client.InnerChannel)) | |
{ | |
HttpRequestMessageProperty requestMessage = new HttpRequestMessageProperty(); | |
requestMessage.Headers["Authorization"] = "Basic 521vYmFsUGF5bWVudEdhdGV3YXk6R1BHMTIz22=="; | |
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestMessage; | |
var res = await client.SomethingAsync(); | |
} |
This file contains 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.Web.Http.Controllers; | |
using System.Web.Http.Filters; | |
namespace Payments.Productization.Process.FilterAttributes | |
{ | |
[AttributeUsage(AttributeTargets.Class)] | |
public class CheckModelForNullAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(HttpActionContext context) |
This file contains 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
#NoEnv | |
SetWorkingDir %A_ScriptDir% | |
;Sets the working directory to be where the script is located. | |
CoordMode, Mouse, Window | |
;Lets the finding of X and Y to be determined by the mouse's coordinates on the functions below. | |
SendMode Input | |
#SingleInstance Force | |
SetTitleMatchMode 2 | |
#WinActivateForce | |
SetControlDelay 1 |
OlderNewer