Skip to content

Instantly share code, notes, and snippets.

View ElanHasson's full-sized avatar
💥
Building Stuff

Elan Hasson ElanHasson

💥
Building Stuff
View GitHub Profile
@ElanHasson
ElanHasson / JabbR-Self-Host-Install.ps1
Created October 10, 2013 14:09
Updated version of Powershell self-host installer script located at http://about.jabbr.net/self-host-install.html to include support for additional site to host Local File System Storage Handler from Feature #1023. It Does the following: 0) Create directory for site 1) Create IIS Site for JabbRLocalFileSystemStorage 2) Create IIS AppPool for new…
$webFolder = "$env:systemdrive\inetpub\jabbr"
$appPoolName = "JabbR"
$siteName = "JabbR"
$dbServer = ".\SQLEXPRESS"
$dbName = "JabbR"
$fileSource = "http://teamcity.codebetter.com/repository/download/bt980/.lastSuccessful/site.zip?guest=1"
$tempFile = "$env:temp\jabbr.zip"
$identity = "IIS AppPool\$appPoolName"
Task flushingTask = null;
public override Task FlushAsync(CancellationToken cancellationToken)
{
Interlocked.CompareExchange(
ref flushingTask,
Task.Delay(200, cancellationToken).ContinueWith(
async (t) =>
{
await write.FlushAsync(cancellationToken);
This file has been truncated, but you can view the full file.
[18C8:18E8][2014-09-06T15:02:33]i001: Burn v3.7.3117.0, Windows v6.3 (Build 9600: Service Pack 0), path: C:\Users\Elan\Downloads\VS2013.3.exe, cmdline: ''
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing string variable 'EditionDisplayName' to value '#loc.vsupdatededitiondisplayname'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing string variable 'FactorMsi' to value '1.3'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'MoreLanguageFwlinkId' to value '376932'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'PrivacyAgreementFwlinkId' to value '376910'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'PrivacyStatementFwlinkId' to value '376910'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'MinOsLevelFwlinkId' to value '376920'
[18C8:18E8][2014-09-06T15:02:33]i000: Initializing numeric variable 'SolutionFwlinkId' to value '376911'
ipmo PKI
$name = [GUID]::NewGuid()
$cerFile = "$env:TEMP\$name.cer"
$certs = Get-ChildItem Cert:\LocalMachine\My -DnsName localhost -SSLServerAuthentication | ? {($_.FriendlyName -eq 'IIS Express Development Certificate') -and ($_.SignatureAlgorithm.FriendlyName -ieq 'sha256RSA') -and ($_.EnhancedKeyUsageList.Count -eq 1)}
if ($certs.Count -eq 0)
{
Write-Error 'Cannot find any SHA256 certificate generated by IIS Express. Please make sure that the latest version of IIS Express is installed.'
}
else
{
@ElanHasson
ElanHasson / SetCsProjVersion.ps1
Last active June 21, 2017 01:00 — forked from bcnzer/SetCsProjVersion.ps1
Powershell script for generating a version number and inserting it into the csproj
param(
[Parameter(Mandatory = $true)]
[string] $csprojPath,
[Parameter(Mandatory = $true)]
[string] $newVersion
)
Write-Host "Starting process of generating new version number for the csproj"
#/bin/bash
bucketname="node-configs"
bucketId=`storj list-buckets | grep "Name: $bucketname" | awk '{ print $2}'`
bucketfiles=`storj list-files "$bucketId"`
for file in *
do
echo $file
@ElanHasson
ElanHasson / RebuildInfraContainer.ps1
Last active July 23, 2018 17:37
For kubernetes on windows pause image:
$BaseDir = "c:\k"
cd $BaseDir
$computerInfo = Get-ComputerInfo
$windowsBase = if ($computerInfo.WindowsVersion -eq "1709") {
"microsoft/nanoserver:1709"
} elseif ( ($computerInfo.WindowsVersion -eq "1803") -and ($computerInfo.WindowsBuildLabEx.StartsWith("17134")) ) {
"microsoft/nanoserver:1803"
} else {
# This is a temporary workaround. As of May 2018, Windows Server Insider builds still report 1803 which is wrong.
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
@ElanHasson
ElanHasson / BatchEnumerableExtensions.cs
Created July 7, 2021 23:42
A set of extensions for batching in Linq
public static class BatchEnumerableExtensions
{
public static IEnumerable<IList<T>> InBatchesOf<T>(this IEnumerable<T> items, int batchSize)
{
var batch = new List<T>(batchSize);
foreach (var item in items)
{
batch.Add(item);
@ElanHasson
ElanHasson / git-commit-author-rewrite.md
Created November 20, 2021 03:43 — forked from trey/git-commit-author-rewrite.md
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author