Skip to content

Instantly share code, notes, and snippets.

Emil Sundin krokofant

  • Sweden
Block or report user

Report or block krokofant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
krokofant / index.js
Last active Jun 17, 2019 — forked from zkat/index.js
npx is cool
View index.js
#!/usr/bin/env node
console.log('yay gist')
console.error('Error :(')
process.exitCode = 1;
View git powershell eol stats.ps1
$files = git ls-files --eol *.less *.cshtml *.html *.txt *.config *.csproj *.sln *.cs *.js *.ts *.json *.bat *.ps1 --full-name;$files | Group-Object { $_.Split('.')[-1] } | Sort Count -Descending | Format-List @{Label="crlf"; Expression={$_.Group | ? { $_ -match "i/crlf" } | % {$i=0} {$i++} {$i} }},@{Label="lf"; Expression={$_.Group | ? { $_ -match "i/lf" } | % {$i=0} {$i++} {$i} }} -GroupBy @{Name="ext";Expression={"." + $_.Name}}
View concfgColorsToWindowsTerminalProfile.js
/*Keep Order*/
const ColorMap = {
DARK_BLACK: "black",
DARK_RED: "dark_red",
DARK_GREEN: "dark_green",
DARK_YELLOW: "dark_yellow",
DARK_BLUE: "dark_blue",
DARK_MAGENTA: "dark_magenta",
DARK_CYAN: "dark_cyan",
DARK_WHITE: "gray",
View Windows10TitleBarColorsFocusInactive.reg
Windows Registry Editor Version 5.00
krokofant / WindowsDefenderExlusions.ps1
Last active Apr 26, 2019
Exlude common programs and folders from Windows Defender
View WindowsDefenderExlusions.ps1
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
$isAdmin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
function Get-Matching-Path ($basePath, $regex) {
Get-ChildItem -Path $basePath -ErrorAction Ignore | Where-Object -FilterScript { $_.Name -match $regex } | Select-Object -Property Name | ForEach-Object { Join-Path $basePath $_.Name }
$paths = @()
$processes = @()
krokofant / pre-commit
Last active Nov 15, 2018
pre-commit hook
View pre-commit
#!/usr/bin/env sh
cd $(git rev-parse --show-toplevel)
currentBranch=$(git rev-parse --abbrev-ref HEAD)
files=$(git diff $currentBranch --name-only -G"fdescribe|fit|describe\.only|it\.only|debugger")
count=$(echo -n $files | wc -m)
if [ $count -gt 0 ]; then
echo "Found fdescribe, fit or debugger in:"
echo "$files"
exit 1
krokofant / GitChangeFileExtension.ps1
Created Oct 25, 2018
Perform name changes with git (git mv) recursively with PowerShell
View GitChangeFileExtension.ps1
Get-ChildItem -Recurse -Include *.js | % { git mv --dry-run $_.FullName $_.FullName.replace
(".js",".ts") }
krokofant /
Created Nov 21, 2017
Certificate installation as system with the use of Magisk
hash=$(openssl x509 -inform PEM -subject_hash_old -in charles-ssl-proxying-certificate.pem | head -1)
mv charles-ssl-proxying-certificate.pem "$hash.0"
echo "Download magisk"

echo "Put $hash.0 into /system/etc/security/cacerts/"
echo "chmod 644 the file"
echo "zip into module and install"
View ojoc-keyhack-Dockerfile
FROM ubuntu:xenial
COPY . .
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y gcc unzip curl wget
ENTRYPOINT cd /x86 && ./
View OxygenOS CallFix.xml
<TaskerData sr="" dvi="1" tv="4.9u4m">
<Task sr="task2">
<Action sr="act0" ve="7">
<Str sr="arg0" ve="3">settings put global op_voice_recording_supported_by_mcc 1</Str>
You can’t perform that action at this time.