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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html {{htmlAttributes}}> | |
<head> | |
{{headTitle}} | |
{{headMetas}} | |
<!-- etc --> | |
</head> | |
<body {{bodyAttributes}}> | |
<div> | |
{{contents}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitlabCreatedMRs | |
// @description Link to created merge requests in Gitlab menu | |
// @version 0.1 | |
// @author e.pelletier | |
// @license MIT | |
// @run-at document-end | |
// @match https://git.vtech.fr/* | |
// @match https://gitlab.com/* | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> |
I had trouble making the Emmet plugin work on my Arch+ST3 install. Don't know if it's Arch's fault, or because my installation is starting to get really old… But here is how it worked in the end as of right now:
- uninstall current Emmet
- uninstall Package Control (we will reinstall it later)
- close Sublime Text 3
- delete all remaining Emmet folders you find in the
~/.config/sublime-text-3 and subdirectories
- delete PyV8 folders you find in
~/.config/sublime-text-3/Packages
and~/.config/sublime-text-3/Installed Packages
- delete all Package Control related files and folders except
~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings
- start Sublime Text 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# convert all .ai files found in current folder to svg | |
for file in $(ls *.ai) | |
do | |
svg_file=$(echo "$file" | sed "s/.ai/.svg/") | |
inkscape --without-gui --file=$file --export-plain-svg=$svg_file | |
done |
NewerOlder