Skip to content

Instantly share code, notes, and snippets.

View mikhaelr's full-sized avatar

Rindone Mikhaël mikhaelr

View GitHub Profile
@mikhaelr
mikhaelr / Onie_theme.icls
Created October 21, 2022 12:36
Main onie theme for phpstorm
<scheme name="Onie theme" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2022-10-21T14:33:08</property>
<property name="ide">PhpStorm</property>
<property name="ideVersion">2022.3.0.0</property>
<property name="modified">2022-10-21T14:33:32</property>
<property name="originalScheme">Onie theme</property>
</metaInfo>
<option name="LINE_SPACING" value="1.6" />
@mikhaelr
mikhaelr / store-git-credential.txt
Created July 21, 2020 10:06
Store git credential
git config --global credential.helper store
@mikhaelr
mikhaelr / mac-os-increase-mouse-speed.txt
Created July 9, 2020 07:27
MacOs - Increase mouse speed
# Get current mouse speed
defaults read -g com.apple.mouse.scaling
# Update mouse speed
defaults write -g com.apple.mouse.scaling 6.0
@mikhaelr
mikhaelr / .htaccess
Created February 12, 2020 15:56
Wordpress .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@mikhaelr
mikhaelr / git-rm
Created January 7, 2019 13:14
Git - removed tracked file
git rm -r --cached <file>
@mikhaelr
mikhaelr / in-viewport-with-intersection-observer.js
Created November 3, 2018 21:27
Detect object in viewport with IntersectionObserver
const $el = document.querySelector("#something")
const observer = new IntersectionObserver( entries => {
entries.forEach(entry => {
if ( entry.isIntersecting ) {
$el.classList.add("is-in-viewport")
observer.disconnect()
}
})
}, {
@mikhaelr
mikhaelr / entry.js
Last active November 2, 2018 10:06
Webpack config
// Import style
require('./../scss/main.scss')
// Create SVG sprite
require.context('./../svg/sprite-optimized?optimized', true, /\.svg$/)
// Create SVG sprite
require.context('./../svg/sprite-non-optimized?non-optimized', true, /\.svg$/)
// Images
require.context('./../img', true)
@mikhaelr
mikhaelr / bash_profile.txt
Created June 23, 2018 08:12
Bash profile, $PATH, etc
// Edit bash_profile with vim
vim ~/.bash_profile
// Reload bash_profile
source ~/.bash_profile
@mikhaelr
mikhaelr / .htaccess
Created June 5, 2018 07:41
.htaccess expiration headers
# Expire images header
ExpiresActive On
ExpiresDefault A0
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
@mikhaelr
mikhaelr / .htaccess
Created June 2, 2018 12:35
WP Force SSL
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# END HTTPS
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f