Skip to content

Instantly share code, notes, and snippets.

View Korko's full-sized avatar

Jérémy Lemesle Korko

View GitHub Profile
@Korko
Korko / phpstan.neon
Last active September 23, 2020 07:42
Larastan default config
includes:
- %rootDir%/../../nunomaduro/larastan/extension.neon
parameters:
paths:
- app
- tests
# The level 8 is the highest level
Const PostEAC15 = "Suivi post VEAC15"
Const LotV6 = "Lots V6"
Const ARemplir = "A remplir"
' Sub pour copier plusieurs colonnes vers un autre onglet
' Après avoir vérifier la cohérence entre plusieurs versions
Sub MacroCheckNCopy()
Dim i As Integer
@Korko
Korko / DeathSwap3.nbt
Last active August 21, 2016 15:22
[Minecraft][Command BLocks][1.9] DeathSwap3
@Korko
Korko / randompasswd.sh
Created June 10, 2015 11:57
Generate htpasswd with random password and send it by mail
#!/bin/bash
password=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16 | xargs)
htpasswd -b /var/ddl.htpasswd korko "$password"
echo "Password set to: "$password | mail -s "Password ddl" "korko@localhost"
@Korko
Korko / command.js
Last active August 29, 2015 14:18
/r/thebutton script to automatically click at a specific time
#paste this line in the console of the devtools (F12) and replace 10000 by your limit in milliseconds (10000ms = 10s)
setInterval(function(){if(r.thebutton._msLeft<=10000){var n = {seconds: r.thebutton._msgSecondsLeft,prev_seconds: r.thebutton._msgSecondsLeft,tick_time: r.thebutton._tickTime,tick_mac: r.thebutton._tickMac};$.request("press_button",n);}},0);
@Korko
Korko / gist:ec8f808a373b17cb96f0
Created February 6, 2015 12:54
Print list of git authors with total added lines, total removed lines, total lines really added and percent of participation over added lines
git shortlog -s | cut -f2 | while read a; do git log --author="$a" --pretty=tformat: --numstat | awk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { print "'"$a"',"add","subs","loc }'; done | awk '{ print; split($0,a,","); total += a[2] } END { print "Total,"total",0,"total }' | sort -nrk2 -t',' | while read l; do a=`echo $l | cut -d',' -f1`; if [ "$a" == "Total" ]; then t=`echo $l | cut -d',' -f2`; fi; mt=`echo $l | cut -d',' -f2`; echo $l","`awk 'BEGIN { printf("%d", '$mt'/'$t'*100) }'`; done | tail -n +2
@Korko
Korko / lastVersion.sh
Created January 20, 2015 16:54
Minecraft management script : Handle ATLauncher modpack check version and update
#!/bin/bash
PACK_NAME="DNSTechpack"
SERVER_FILE=$2
usage() {
echo "Usage: $0 {get|update} (new version file)"
return 1
}
@Korko
Korko / gist:db0676536d74375a7b78
Last active August 29, 2015 14:11
[Minecraft][Command BLocks][1.8] Door
/scoreboard objectives add DoorProximity dummy
/scoreboard objectives add DoorProximity_ dummy
/scoreboard objectives add DoorMove dummy
/scoreboard objectives add DoorClock dummy
/scoreboard objectives add DoorType dummy
/scoreboard players set @e[type=ArmorStand,name=Door] DoorProximity_ 0
/execute @e[type=ArmorStand,name=Door] ~ ~ ~ scoreboard players operation @e[r=0,c=1] DoorProximity_ = @e[r=0,c=1] DoorProximity
/scoreboard players set @e[type=ArmorStand,name=Door] DoorProximity 0
@Korko
Korko / gist:e5f45c58226618445483
Last active August 29, 2015 14:10
[Minecraft][Command Blocks][1.8] Road Builder
# CommandBlock order : West, East, Down, Up, North, South
# /give @p minecraft:diamond_hoe 1 0 {display:{Name:"RoadBuilder"}}
# Only call once
/scoreboard objectives add RoadBuilding dummy
/scoreboard objectives add RoadBuildingC dummy
# Around a fast clock (20t/s)
# /fill ~ ~-1 ~ ~ ~-1 ~-1 redstone_block
@Korko
Korko / gist:63e0f314cc88715ccf1b
Created November 25, 2014 19:48
[Minecraft][Command Blocks][1.8] Auto set scoreboard
# CommandBlock order : West, East, Down, Up, North, South
# Only call once
/scoreboard objectives add Spawn dummy
/scoreboard objectives add SpawnSave dummy
# Around a fast clock (20t/s)
# /fill ~ ~-1 ~ ~ ~-1 ~-1 redstone_block
# /fill ~ ~1 ~ ~ ~1 ~-1 stone