Skip to content

Instantly share code, notes, and snippets.

View manuhabitela's full-sized avatar
🦆

Emmanuel Pelletier manuhabitela

🦆
View GitHub Profile
@manuhabitela
manuhabitela / README.md
Created February 23, 2025 12:56
Extract aur cursor-bin appimage

I use this script after every https://aur.archlinux.org/packages/cursor-bin update to use cursor outside its appimage archive.

It's meant to be placed and executed in /opt/.

This is useful especially because mise seems to have issues with cursor appimage. Thanks @smujaddid for the tip :)

@manuhabitela
manuhabitela / readme.md
Created January 20, 2025 14:24
Grist theme common variables

This JSON file is an attempt at helping us easily see the colors used across light and dark grist themes.

For example, the first item of the array tells us that in the 46 listed variables, the light theme color #929299 is used at the same time the dark theme color #a4a4b1 is used.

We can use this data to help us come up with new generic tokens that work accross both light and dark themes.

@manuhabitela
manuhabitela / README.md
Last active September 2, 2022 16:48
Setting up atomizer in a vite project

This is just a copy of a work I won't use right now I guess. Wanted to use atomizer (acss.io) in a vite project and the official plugin didn't work in dev mode. So I tried a few things.

@manuhabitela
manuhabitela / monitor.sh
Last active July 26, 2021 05:15
Easy monitor switch
#!/bin/bash
# see help section below for script description
# change the four "constants" below to match your config
# this is the xrandr monitor name for the "temporary" monitors you connect often on your laptop,
# via the HDMI or VGA cable directly, for projecting on TV or whatever
DEFAULT_OTHER_MONITOR="VGA-1"
# this is the xrandr monitor name of your usual external monitor you use 99% of the time
DEFAULT_WORK_MONITOR="DP-2"
@manuhabitela
manuhabitela / jsonToFiles.js
Created December 3, 2017 17:56
Metalsmith plugin to transform one JSON array to multiple "files" in the metalsmith chain
const _ = require('lodash');
const path = require('path');
/**
* metalsmith plugin that transforms one JSON array to multiple "files" in the metalsmith chain
*
* A JSON file is taken by the plugin if a ".json" extension is detected + it has a "type: collection" metadata.
* Each object in the JSON array must at least have a "path" key to generate the fake file path.
* All other properties are set on the file object.
*
@manuhabitela
manuhabitela / base.html
Last active September 18, 2018 14:44
metalsmith-react-templates example of a custom strategy & hydrator for React Helmet server-side rendering
<!DOCTYPE html>
<html {{htmlAttributes}}>
<head>
{{headTitle}}
{{headMetas}}
<!-- etc -->
</head>
<body {{bodyAttributes}}>
<div>
{{contents}}
@manuhabitela
manuhabitela / index.js
Last active September 23, 2018 17:33
Liens youtube du topic musique electroniques jeuxonline.info
const process = require('process');
const cheerio = require('cheerio');
const request = require('request');
const queryString = require('query-string');
const getPage = (url) =>
new Promise((resolve, reject) => {
request(url, (error, response, body) => {
@manuhabitela
manuhabitela / watchexec-prettier.sh
Created May 1, 2017 16:55
Start prettier on each file change via watchexec
#!/bin/bash
# Automatically pass prettier when a file changes thanks to watchexec.
#
# start this at the root of a js directory you want to pass prettier on file save
#
# recommended watchexec setup: `watchexec --postpone --exts js`
#
# ```
# cd ~/myproject
@manuhabitela
manuhabitela / gitlab-merge-requests-link-userscript.js
Last active October 16, 2017 07:19
Assigned merge request shortcuts in Gitlab Menu UserScript
@manuhabitela
manuhabitela / index.html
Last active February 15, 2017 08:16
azdazdazd
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/tachyons.min.css"/>
<link href="https://fonts.googleapis.com/css?family=Righteous" rel="stylesheet">