Skip to content

Instantly share code, notes, and snippets.

View nelsonr's full-sized avatar
💭
Making stuff

Nelson Rodrigues nelsonr

💭
Making stuff
  • Lisboa, Portugal
View GitHub Profile
@nelsonr
nelsonr / unique-colors.html
Created April 1, 2022 10:59
Preview unique colors in a CSS stylesheet
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colors Preview</title>
<style>
* {
@nelsonr
nelsonr / .eslintrc.json
Created February 1, 2022 15:41
Custom ESLint config
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
[
// Sidebar rows
{
"class": "tree_row",
"layer0.opacity": 0.0,
"layer1.opacity": 0.0,
"layer1.inner_margin": [1,1]
},
// Sidebar row hover
{
@nelsonr
nelsonr / Preferences.sublime-settings
Last active December 19, 2016 16:05
Sublime Text 3 User Settings
{
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Flatland Dark (SL).tmTheme",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"env":
{
"PATH": "/usr/local/bin/elixir"
},
"file_exclude_patterns":
@nelsonr
nelsonr / user.sublime-keymap
Last active December 19, 2016 16:05
My Sublime Text keymap
[
// {"keys": ["ctrl+m"], "args": {"action": "matching_pair"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.matching_pair"} ] },
// Show/Hde Elm Type panel
// { "keys": ["alt+i"], "command": "elm_show_type_panel", "context": [ { "key": "selector", "operator": "equal", "operand": "source.elm" } ] },
// { "keys": ["alt+i"], "command": "hide_panel", "context": [ { "key": "selector", "operator": "equal", "operand": "source.elm" } ] },
// Expand abbreviation
{
@nelsonr
nelsonr / Super Komodo PHP Regex
Created July 5, 2012 09:52
Regex for PHP associative array keys that lack quotes
Regex for PHP associative array keys that lack quotes
------------------------------------------------------
Find with: \$([a-z0-9_]*)\[(?!('|"))([a-z0-9_]*)(?!('|"))\]
Replace with: $\1['\3']
\1 and \3 relate to groups in the expression that are whatever what's inside parentheses.
The first and third group ([a-z0-9_]*) are equal and each one