My version of the ultimate whatever-to-number conversion table, heavily inspired by https://stackoverflow.com/a/17106702
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
/** | |
* Spawn the given command with its arguments, exit with the inverse of the | |
* exit code of the spawned command: exits 0 if the code is anything other | |
* than 0, and exits with 1 if the code is 0. | |
* | |
* Usage: | |
* | |
* node scripts/utils/negateExitCode.js <command> [<arguments>...] | |
* | |
* Examples: |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
</head> | |
<body> | |
<style> | |
</style> | |
</body> | |
</html> |
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
Copyright <YEAR> <OWNER> | |
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
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
# Find Autoelevate executables | |
Write-Host "System32 Autoelevate Executables" -ForegroundColor Green -BackgroundColor Black | |
Select-String -Path C:\Windows\System32\*.exe -pattern "<AutoElevate>true" | |
Write-Host "`nSysWOW64 Autoelevate Executables" -ForegroundColor Green -BackgroundColor Black | |
Select-String -Path C:\Windows\SysWOW64\*.exe -pattern "<AutoElevate>true" |
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
// ==UserScript== | |
// @name Align Youtube Ponies@Dawn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Make the video always occupy the same column, so as to make them easier to find | |
// @author Mathieu CAROFF | |
// @match https://www.youtube.com/channel/UCSJW3EMxeuQXZ00h4bihXvA/videos | |
// @grant none | |
// ==/UserScript== |
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
#.tmux.conf | |
# upstream | |
# https://gist.github.com/jnaulty/55d03392c37e9720631a | |
# obtain | |
# ```bash | |
# curl https://gist.githubusercontent.com/mathieucaroff/7037f7f40e359d6a605638872bfd19c2/raw/.tmux.conf --output ~/.tmux.conf | |
# ``` |
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
package main | |
// An example of use of the go yaml v3 Node API | |
// Disclaimer: I'm very new to go. This code may miss a lot of Go goodnesses | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" |
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
var MAX_DEPTH = 20 | |
export var expandedLog = (obj: Record<string, unknown>, depth: number = 0) => { | |
var [[name, item]] = Object.entries(obj) | |
if (depth < MAX_DEPTH && typeof item === 'object' && item) { | |
var typeString = Object.prototype.toString.call(item) | |
var objType = typeString.replace(/\[object (.*)\]/, '$1') | |
console.group(`${name}: ${objType}`) | |
Object.entries(item).forEach(([key, value]: any) => { |
git config --global user.name "Mathieu CAROFF"
git config --global user.email "[email protected]"
NewerOlder