Ignore changes without .gitignore:
git update-index --assume-unchanged NAME_OF_FILE_HERE
See log of deleted file
git log --follow -- src/FILENAME
Exit git log
public class PrimitiveConverter : JsonConverter | |
{ | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
{ | |
var token = JToken.FromObject((value as PrimitiveWrapper)._value); | |
token.WriteTo(writer); | |
} | |
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | |
{ |
Ignore changes without .gitignore:
git update-index --assume-unchanged NAME_OF_FILE_HERE
See log of deleted file
git log --follow -- src/FILENAME
Exit git log
# Generates IIS bindings based on certificate | |
try{ | |
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ | |
$arguments = "& '" +$PSCommandPath + "'" | |
Start-Process powershell -Verb runAs -ArgumentList $arguments | |
Break | |
} |
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] | |
"DisabledHotkeys"="S" |
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Group Policy
HKEY_CURRENT_USER\Software\Policies\Microsoft
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies
function getControlNumber(code) { | |
var multiplier1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1], | |
multiplier2 = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3], | |
mod, | |
total = 0; | |
for (var i = 0; i < 10; i++) { | |
total += code.charAt(i) * multiplier1[i]; | |
} | |
mod = total % 11; |
$folder = 'D:\Ergo\Videos\convert_queue' | |
$filter = '*.*' | |
$fsw = New-Object IO.FileSystemWatcher $folder, $filter | |
$fsw.IncludeSubdirectories = $false | |
$fsw.NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' | |
$a = Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated | |
while($true) { | |
$vnt = Wait-Event -SourceIdentifier FileCreated | |
$name = $vnt.SourceEventArgs.Name | |
$path = $vnt.SourceEventArgs.FullPath |
// ==UserScript== | |
// @name JiraTogglTotalTime | |
// @namespace https://gist.github.com/ErgEnn/6fd34add5aa1d6bfdd0f1b634b93a77e | |
// @version 0.3 | |
// @description Shows total time of Jira ticket based on Toggl(client side only). Requires Toggl task descr to contain the ticket key. | |
// @author Ergo Enn | |
// @match https://*/browse* | |
// @match https://*/jira/software* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js |
// ==UserScript== | |
// @name JiraCopyBranchName | |
// @namespace | |
// @version 0.1 | |
// @description Removes the GIT CLI command for branch creation from Create Branch menu for easier copying | |
// @author Ergo Enn | |
// @match https://*/browse* | |
// @match https://*/jira/software* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js |
# recursively run docker-compose on all docker-compose.yml | |
dir -recurse -include docker-compose.yml | Foreach {docker-compose --file $_.fullName down} |