Skip to content

Instantly share code, notes, and snippets.

@laem
laem / logs
Last active July 10, 2017 10:58
# Cet ensemble de scripts pour obtenir les stats du simulateur d'embauche est complètement archaïque...
# mais on le fait tourner seulement tous les 2-3 mois...
# Sur le serveur
mkdir logs-DATE
sudo su
cp /var/log/nginx/openfisca.* /home/pousse/logs-10juillet2017/
# on compresse les logs pour les transférer sur un autre ordi...
tar -czvf logs-DATE.tar.gz logs-DATE
@laem
laem / HoverDecorator.jsx
Last active May 8, 2017 10:45
React Hover Component Decorator
import React, {Component} from 'react'
export default DecoratedComponent =>
class extends Component {
state = {
hover: false,
}
toggleHover = () =>
this.setState({hover: !this.state.hover})
render() {
C-Em7
C-Em7
C
Em7
Am
Dm
F-G
C-Em7
@laem
laem / Init.vim
Last active March 13, 2024 17:28
~/.config/nvim/init.vim
autocmd BufNewFile,BufRead *.tsx set filetype=typescript.tsx
call plug#begin('~/.local/share/nvim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver']
Plug 'ctrlpvim/ctrlp.vim'
Plug 'leafgarland/typescript-vim'
Plug 'dyng/ctrlsf.vim'
Plug 'rakr/vim-one'
@laem
laem / maplibre-gl.css
Last active September 18, 2024 18:21
Globe maplibre-js preversion
.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch