Skip to content

Instantly share code, notes, and snippets.

private string firstPassword;
public string FirstPassword
{
get { return firstPassword; }
set {
if (Set(() => FirstPassword, ref firstPassword, value))
{
UpdateProgressBar();
}
}
C:.
+---.atom
| \---compile-cache
| \---836a81e7afc5e1080850f10b0790220f3d81503a
| \---js
+---.p4merge
+---Contacts
+---Desktop
+---Documents
| +---Custom Office Templates
@cmatskas
cmatskas / linqQuery.cs
Created July 7, 2015 10:55
LINQ query
var itemsToDelete = from p in dbContext.SnowManagements
where siteIds.Contains(p.SiteId)
&& p.Created.Date == DateTime.Today.Date)
select p;
@cmatskas
cmatskas / LinqQueryWithTruncate.cs
Created July 7, 2015 11:00
LinqQueryWithTruncate
var itemsToDelete = from p in dbContext.SnowManagements
where siteIds.Contains(p.SiteId)
&& DbFunctions.TruncateTime(p.Created.Date) == DbFunctions.TruncateTime(DateTime.Today)
select p;
@cmatskas
cmatskas / LinqWithTruncateWorking.cs
Created July 7, 2015 11:06
LinqWithTruncateWorking
var itemsToDelete = from p in dbContext.SnowManagements
where siteIds.Contains(p.SiteId)
&& DbFunctions.TruncateTime(p.Created) == DbFunctions.TruncateTime(dateToDelete)
select p;
@cmatskas
cmatskas / workingAsmlService.cs
Created July 7, 2015 12:07
Working asmx Service
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Services;
using System.Web.Services;
namespace WebApplication1
{
/// <summary>
@cmatskas
cmatskas / gettingstartedwithopensource.txt
Created July 9, 2015 11:34
Open Source talk abstract
Getting Started with Open Source - Abstract
Are you a developer that wants to give back to the open source community? Perhaps you want to built some experience by
working on open source? Or you want to join the open source movement because, well, OSS is the future? Just look at all
the cool tech built with OSS: Node.js, BootStrap, ASP.NET etc. Join Christos Matskas to learn about the many ways to
contribute, key development tools, communication in OSS projects and what it takes to become a succesful first time
contributor and collaborator in this welcoming and open community.
@cmatskas
cmatskas / pbkdf2dotnetsample.cs
Last active March 3, 2018 09:39
Pbkdf2 .NET Sample
public class PasswordHash
{
public const int SaltByteSize = 24;
public const int HashByteSize = 20; // to match the size of the PBKDF2-HMAC-SHA-1 hash
public const int Pbkdf2Iterations = 1000;
public const int IterationIndex = 0;
public const int SaltIndex = 1;
public const int Pbkdf2Index = 2;
public static string HashPassword(string password)
@cmatskas
cmatskas / GitDeleteCommands.ps1
Last active September 22, 2022 07:59
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch
@cmatskas
cmatskas / stripeJavaScriptCode.js
Created August 7, 2015 19:53
Stripe JavaScript code
@section Scripts {
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<script type="text/javascript">
$('document').ready(function() {
Stripe.setPublishableKey('Your Publisheable Key Goes here');
$('#btnCharge').on('click', function(e) {
e.preventDefault();
e.stopPropagation();