Skip to content

Instantly share code, notes, and snippets.

View liitfr's full-sized avatar

Mathias Hoffmann liitfr

View GitHub Profile
@liitfr
liitfr / README.md
Last active March 13, 2024 17:43
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f | xargs chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false

Keybase proof

I hereby claim:

  • I am liitfr on github.
  • I am liitfr (https://keybase.io/liitfr) on keybase.
  • I have a public key ASBh5kRP1YE1rAuck4PHJMqUow63N7-LSVouzv_XIQsQnwo

To claim this, I am signing this object:

@liitfr
liitfr / .gitignore
Last active November 28, 2017 12:09
quickly setup a mocking API server with JWT support
node_modules
@liitfr
liitfr / lambert-converter.js
Created November 17, 2017 16:41
Convert LAMBERT93 coordinates to WGS with JS
// this function converts LAMBERT93 coordinates used by IGN to lat / lon coordinates
// found here https://gist.github.com/will83/5920606
const toWGS = (x, y) => {
const b7 = 298.257222101;
const b8 = 1 / b7;
const b9 = 2 * b8 - b8 * b8;
const b10 = Math.sqrt(b9);
const b13 = 3;
const b14 = 700000;
const b15 = 12655612.0499;
@liitfr
liitfr / readme.md
Last active September 12, 2017 14:50
How to use Zepto with Shoelace.css & Webpack

How to use Zepto with Shoelace.css & Webpack

first of, npm install --save-dev zepto-webpack.
Then, in your Webpack config :

  // ...
  resolve: {
    alias: {
      ShoelaceDropDowns: path.resolve(__dirname, 'node_modules/shoelace-css/source/js/dropdowns.js'),
      ShoelaceTabs: path.resolve(__dirname, 'node_modules/shoelace-css/source/js/tabs.js'),
@liitfr
liitfr / readme.md
Last active September 22, 2023 19:18
unlock NP when stuck at "Pushing tags" step

If you want to push tag manually & identify problem

git push --follow-tags

Enable SSH

  1. Generate an SSH key

Open terminal to create ssh keys:

@liitfr
liitfr / app.js
Last active August 2, 2017 01:07
inline sugarss in sugarml with spike
const cssStandards = require('spike-css-standards')();
const postcss = require('postcss');
module.exports = {
reshape: htmlStandards({
locals: ctx => ({ pageId: pageId(ctx) }),
content: {
postcss: css => postcss(cssStandards.plugins)
.process(css, { parser: cssStandards.parser })
.then(res => res),
@liitfr
liitfr / after.png
Last active July 17, 2017 19:11
Google Font : Increase your Google's Page Speed Insight score
after.png
@liitfr
liitfr / readme.md
Created July 14, 2017 19:20
you accidentally commited your .env file in a previous commit, and you want it to disappear ? 🕵

Answer

Execute this code in your repository

git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch .env' \
--prune-empty --tag-name-filter cat -- --all
@liitfr
liitfr / .htaccess
Last active October 28, 2017 02:19
Service worker & offline first
# ...
<Files sw.js>
# FileETag None # LIIT : disabled this to check if it allows cdn update
# Header unset ETag # LIIT : disabled this to check if it allows cdn update
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</Files>