Skip to content

Instantly share code, notes, and snippets.

View mjoey's full-sized avatar
🎯
Focusing

Michaël Joseph mjoey

🎯
Focusing
View GitHub Profile
<template>
<div>
<h1>Hello Nuxters! 👋</h1>
<p>
This page is rendered on the <strong>{{ rendering }}</strong>
</p>
<p v-if="rendering === 'server'">
First load or hard refresh is done on server side.
</p>
<p v-if="rendering === 'client'">Navigation is done on client side.</p>
@mjoey
mjoey / brightness.sh
Last active August 30, 2020 07:52
Debian - Set screen brightness
xrandr #to know the output name
xrandr --output eDP-1 --brightness 0.5
#To generate a password hash to use with puppet manifest files you can use the mkpasswd utility
mkpasswd -m sha-512

Oops! I accidentally deleted a local git branch, and I haven't pushed it to a remote server yet. The branch has several important commits, and it hasn't been merged with any other branches yet. How do I find the missing branch?

1. Create a list of all dangling or unreachable commits.

$ git fsck --full --no-reflogs --unreachable --lost-found
unreachable tree 4a407b1b09e0d8a16be70aa1547332432a698e18
unreachable tree 5040d8cf08c78119e66b9a3f8c4b61a240229259
unreachable tree 60c0ce61b040f5e604850f747f525e88043dae12
unreachable tree f080522d06b9853a2f18eeeb898724da4af7aed9
@mjoey
mjoey / vim-compilation.sh
Last active March 12, 2023 16:40
[michael-joseph.me] Vim Compilation in 4 steps
#VIM COMPILATION
cd vim/src
#LIB Installation
sudo apt install xorg-dev
#1 CLEAN CONTENT FOLDER
make distclean
#2 CONFIGURATION
@mjoey
mjoey / htpasswd.sh
Last active August 29, 2015 14:04
[michael-joseph.me] Genrate htpasswd file
htpasswd -c .htpasswd floriane
@mjoey
mjoey / formatpriceinjs.php
Last active August 29, 2015 14:04
[For Blog][Magento]Format Price in Js
<?php $format = Mage::helper('core')->jsonEncode(Mage::app()->getLocale()->getJsPriceFormat());?>
var price = formatCurrency('99.99',<?php echo $format ?>);
@mjoey
mjoey / sxiv.sh
Last active August 29, 2015 14:04
[For Blog] [debian] [Simple X Image Viewer] Installation
sudo apt-get install sxiv #installation
sxiv monimage.png #open a picture
sxiv -t * #view thumbnails in current folder