Skip to content

Instantly share code, notes, and snippets.

View EtienneDuv's full-sized avatar

Adalon EtienneDuv

  • Looking for job
  • Prague
View GitHub Profile
@EtienneDuv
EtienneDuv / a.md
Last active February 14, 2023 17:36
Custom DOSKEY in terminal

Add in regedit Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor new key :

  • Autorun = doskey /macrofile="path/to/file/macro.txt" /f

Create file path/to/file/macro.txt

nr=npm run $*
ls=dir /OG /B $*
@EtienneDuv
EtienneDuv / generateBeep.js
Last active October 20, 2023 08:30
JS metronome
const a = new AudioContext()
const getRandInt = () => Math.round(Math.random()*255)
k = (w,x,y) => {
console.log("Gain:"+w, "Hz:"+x, "ms:"+y)
v = a.createOscillator()
u = a.createGain()
v.connect(u)
v.frequency.value = x
v.type = "square"
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"console.log()": {
"prefix": "cl",
"body": [
"console.log($1)"
@EtienneDuv
EtienneDuv / terminalCustomActions.json
Created December 15, 2021 08:41
Custom actions for Windows Terminal
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
@EtienneDuv
EtienneDuv / devEnv.bat
Last active March 2, 2022 15:30
env setup for Windows Terminal
@echo off
docker start mysql>NUL
docker start naughty_faraday>NUL
docker start redis>NUL
GOTO:DEFAULTS
rem == DEFAULTS============
call :run chrome, "C:\Program Files\Google\Chrome\Application\"
call :run sublime_text, "D:\Programs\Sublime Text 3\"
call :run code, "D:\Programs\Microsoft VS Code"
@EtienneDuv
EtienneDuv / .eslintrc
Created July 8, 2021 13:07
eslint config
{
"parserOptions":{
"ecmaVersion":2018
},
"env":{
"es6":true,
"node":true,
"mocha":true
},
"extends":"eslint:recommended",
@EtienneDuv
EtienneDuv / git alias.txt
Last active November 21, 2023 08:52
.gitconfig
[alias]
b = branch
c = commit -m
s = switch
sc = switch -c
f = fetch --all
la = log --graph --decorate --pretty=oneline --abbrev-commit --all
l = log --pretty=format:'%Cred%h%Creset - %<|(60)%C(bold)%s%Creset %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
p = push
pf = push --force-with-lease