Skip to content

Instantly share code, notes, and snippets.

@illvart
illvart / uca.xml
Last active June 29, 2021 12:56
Thunar Action
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon></icon>
<name>Delete/Bypass Recycle Bin</name>
<unique-id>1583421083799085-2</unique-id>
<command>rmtrash -rf %f %F</command>
<description>Description: Removes the selected file(s) from the disk, bypassing any local Recycle bin.</description>
<patterns>*</patterns>
<directories/>
@illvart
illvart / 20-intel.conf
Last active December 12, 2020 02:56
My Linux system setup
# /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true" # Tearing
Option "DRI" "2" # DRI3 is now default
#Option "AccelMethod" "sna" # default
#Option "AccelMethod" "uxa" # fallback
@illvart
illvart / cloudSettings
Last active March 22, 2020 20:30
VSCode - Visual Studio Code (code|code-oss - /usr/bin/code --unity-launch %F) Settings Sync Gist
{"lastUpload":"2020-03-22T20:30:31.296Z","extensionVersion":"v3.4.3"}
@illvart
illvart / netlify.toml
Created January 12, 2020 14:05
netlify.toml (netlify.com) config
[build]
publish = "public"
command = "yarn build" # or gulp default
[[headers]]
for = "/*"
[headers.values]
X-Content-Type-Options = "nosniff"
Strict-Transport-Security = "max-age=31536000"
Referrer-Policy = "no-referrer-when-downgrade"
@illvart
illvart / now.md
Last active January 13, 2020 15:59
now.json (zeit.co) config

@now/static

{
  "name": "illvart",
  "version": 2,
  "builds": [{ "src": "./public/**", "use": "@now/static" }],
  "routes": [
    { "src": "/(.*)", "dest": "public/$1" },
    { "handle": "filesystem" },
 { "src": "/.*", "status": 404, "dest": "public/404.html" }
@illvart
illvart / regexCheatsheet.js
Created December 17, 2019 12:01 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@illvart
illvart / regex.md
Created December 17, 2019 11:44 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@illvart
illvart / client.js
Created November 23, 2019 10:37 — forked from aerrity/client.js
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
@illvart
illvart / smooth-scrolling-polyfill.md
Created November 14, 2019 19:58 — forked from eyecatchup/smooth-scrolling-polyfill.md
Smooth Scroll behavior polyfill

The Scroll Behavior specification has been introduced as an extension of the Window interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.

There's a complete polyfill here (3.3KB minified). But most of the times, the following is enough for me (641 bytes minified):

smooth-scrolling-poyfill.js

Use as: scrollToElem('#elem-selector');

@illvart
illvart / GPG.md
Last active October 22, 2019 12:46
Create a SSH and GPG