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
USE [master] | |
GO | |
CREATE LOGIN [<UserName>] WITH PASSWORD=N'<SomeKindOfStrongPassword>', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON | |
GO | |
USE [<DBName>] | |
GO | |
CREATE USER [<UserName>] FOR LOGIN [<UserName>] | |
GO | |
USE [<DBName>] | |
GO |
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
@RunWith(MockitoJunitRunner.class) | |
//@ContextConfiguration({"/stuff.xml"}) | |
public class SomeDaoTest { | |
@Mock | |
private SessionFactory factory; | |
@Mock | |
private Session session; |
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
function open { | |
explorer . | |
} | |
function reset-me { | |
echo 'resting HEAD' | |
git fetch origin | |
git reset --hard origin/master | |
} |
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 Moq; | |
using NUnit.Framework; | |
using Should; | |
//and some other stuff | |
namespace WorkerTests | |
{ | |
[TestFixture] | |
public class Worker_CreateThingFromContractTests | |
{ |
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
### Keybase proof | |
I hereby claim: | |
* I am jeriley on github. | |
* I am jeriley (https://keybase.io/jeriley) on keybase. | |
* I have a public key whose fingerprint is B38D 868C 4219 D39A 2090 E6EA 57F3 D2D9 5A72 BDC0 | |
To claim this, I am signing this object: |
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
export class SalesforceChecksum | |
{ | |
private lookup = {}; | |
private checksumChars = Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"); | |
constructor() | |
{ | |
for (var i = 0; i < 32; i++) | |
{ | |
let value = (i >>> 0).toString(2); |
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 class Checksum | |
{ | |
private Dictionary<string, char> _lookup = new Dictionary<string, char>(); | |
private char[] _checksumChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345".ToCharArray(); | |
public Checksum() | |
{ | |
for (var i = 0; i < 32; i++) | |
{ | |
var bit = Convert.ToString(i, 2).PadLeft(5, '0'); |
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
function buildIt($){ | |
this.postIt = function(itemToChange){ | |
$.post('giggle', function(data){ | |
itemToChange.item = data.item; | |
}); | |
} | |
}; | |
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
@echo do you have winutils or hadoop_home? | |
mkdir C:\tmp\hive | |
%HADOOP_HOME%\bin\winutils chmod 777 /tmp/hive | |
@echo does your path have a thing for spark? | |
cd C:\ | |
spark-shell |
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
namespace Moq.Context { | |
public static class DbContextMockExtension | |
{ | |
public static Mock<AHContext> SetupPartOfTheContextWith<T>(this Mock<AHContext> mockContext, List<T> listOfT, Expression<Func<AHContext, DbSet<T>>> setupReturn) where T : BaseEntity | |
{ | |
var queryable = listOfT.AsQueryable(); | |
var mockSet = new Mock<DbSet<T>>(); |
NewerOlder