Skip to content

Instantly share code, notes, and snippets.

View mickaelperrin's full-sized avatar

Mickaël PERRIN mickaelperrin

  • dkod
  • Toulon, France
View GitHub Profile
@mickaelperrin
mickaelperrin / .skhdrc
Created March 27, 2023 11:02
SKHD configuration, mainly to manage yabai
#!/usr/bin/env sh
# _ _ _
# | | | | | |
# ___| | _| |__ __| |_ __ ___
# / __| |/ / '_ \ / _` | '__/ __|
# \__ \ <| | | | (_| | | | (__
# |___/_|\_\_| |_|\__,_|_| \___|
#
:: default : yabai -m config active_window_border_color 0x99DD0000
@mickaelperrin
mickaelperrin / .skhdrc
Last active March 27, 2023 11:09
Yabai configuration
#!/usr/bin/env sh
# _ _ _
# | | | | | |
# ___| | _| |__ __| |_ __ ___
# / __| |/ / '_ \ / _` | '__/ __|
# \__ \ <| | | | (_| | | | (__
# |___/_|\_\_| |_|\__,_|_| \___|
#
:: default : yabai -m config active_window_border_color 0x99DD0000
--- ./newroyalslider.php 2021-03-18 19:22:43.000000000
+++ ./newroyalslider.php 2021-03-18 19:30:49.000000000
@@ -31,1 +31,1 @@
- $new_royalSlider = new NewRoyalSliderMain(__FILE__);
+ $GLOBALS['new_royalSlider'] = new NewRoyalSliderMain(__FILE__);
@mickaelperrin
mickaelperrin / _symfony
Last active February 16, 2021 19:35
Symfony ZSH completion with caching
#compdef _sfbinary symfony
function _symfony_caching_policy() {
local -a oldp
oldp=( "$1"(Nmh+24) )
(( $#oldp ))
}
function _sfbinary_subcommand() {
if ( [[ ${+list} -eq 0 ]] || _cache_invalid "symfony_subcommand_console" ) && ! _retrieve_cache "symfony_subcommand_console"; then
list=$(symfony $1 --no-ansi 2>/dev/null | sed "1,/Available commands/d" | awk '/^ ?[^ ]+ / { print $1 }')
@mickaelperrin
mickaelperrin / phpenv-macos.sh
Created February 10, 2021 20:43 — forked from christopher-hopper/phpenv-macos.sh
Install phpenv on macOS with homebrew php packages.
#!/usr/bin/env bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
# Install or re-install phpenv with
# multiple versions of PHP on macOS.
#
# Usage:
#
# curl -L https://git.io/JvG7i | bash
#
@mickaelperrin
mickaelperrin / RepartitionServer.md
Created September 20, 2019 09:05
Repartition Server

#1 - installation par défaut:

Partitionnement au travers de l'outil online:

  • /boot : Ext4 / RAID1 / 1000Mo
  • swap: SWAP / pas de raid / 3000Mo
  • /: Ext4 / RAID5 / 20000Mo
  • /data: EXT4 / RAID5 / le reste 215Go

#2 - une fois l'installation par défaut faite

@mickaelperrin
mickaelperrin / Result_of_composer_isntall
Last active June 28, 2019 07:52
WPEmerge composer dependency issue
```
Your requirements could not be resolved to an installable set of packages.
Problem 1
- dkod/dkod-framework v0.3.12 requires htmlburger/wpemerge-blade ~0.15 -> satisfiable by htmlburger/wpemerge-blade[0.15.0].
- Installation request for dkod/dkod-framework ^0.3.12 -> satisfiable by dkod/dkod-framework[v0.3.12].
- Conclusion: remove paragonie/random_compat v9.99.99
- Conclusion: don't install paragonie/random_compat v9.99.99
- htmlburger/wpemerge-blade 0.15.0 requires illuminate/view 5.4.* -> satisfiable by illuminate/view[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
- illuminate/view v5.4.0 requires illuminate/support 5.4.* -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
@mickaelperrin
mickaelperrin / README.md
Last active November 27, 2023 16:31
1Password login / logout helper

Session sharing across terminals for 1Password

This script intends to improve usability of 1Password CLI when working with multiple sessions and.or terminals

How to use ?

Login

oplogin
@mickaelperrin
mickaelperrin / default.conf
Last active February 27, 2019 09:41
Create docker registry proxy for gitlab.com (proxifies myregistry.mydomain.tlf/myimage to registry.gitlab.com/mygitlabproject/myimage)
server {
listen 80;
server_name registry.docker;
set $vendor your_gitlab_vendor_name;
# Prevent infinite loop of redirects
location /v2/$vendor/ {
proxy_pass https://registry.gitlab.com;
}
@mickaelperrin
mickaelperrin / initMac.sh
Created October 6, 2017 10:04 — forked from florianrusch/initMac.sh
Init Mac file
#/bin/sh
#
# Reasonably sets OS X defaults. My sources:
# - https://ss64.com/osx/syntax-defaults.html
# - https://github.com/nicksp/dotfiles/blob/master/osx/set-defaults.sh
# - https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#