Skip to content

Instantly share code, notes, and snippets.

Nelson Rodrigues nelsonr

  • Lisboa, Portugal
Block or report user

Report or block nelsonr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nelsonr
nelsonr / keybindings.json
Last active Aug 9, 2019
Keyboard Shortcuts for Visual Studio Code (Windows)
View keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+shift+d",
"command": "-workbench.view.debug"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
View Flatland Dark.sublime-theme
[
// 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 Dec 19, 2016
Sublime Text 3 User Settings
View Preferences.sublime-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":
View groups.rb
data = [
{a: 'a', b: 1},
{a: 'a', b: 2},
{a: 'a', b: 2},
{a: 'a', b: 4},
{a: 'b', b: 5},
{a: 'b', b: 6},
{a: 'b', b: 7},
{a: 'b', b: 8},
]
@nelsonr
nelsonr / user.sublime-keymap
Last active Dec 19, 2016
My Sublime Text keymap
View user.sublime-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 / dabblet.css
Created Jan 17, 2014
IE can't do a 360
View dabblet.css
/**
* IE can't do a 360
*/
/**
* This jump animation works great on Chrome and Firefox but
* totally fails in IE 10 and 11
*/
@keyframes jump {
@nelsonr
nelsonr / models.py
Last active Dec 30, 2015
Testing models in Django 1.6. with South 0.8.4, Selenium 2.38.1
View models.py
import random
import string
import datetime
from django.db import models
class Articles(models.Model):
title = models.CharField(
max_length=140,
unique=True,
View robot.js
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@nelsonr
nelsonr / Super Komodo PHP Regex
Created Jul 5, 2012
Regex for PHP associative array keys that lack quotes
View Super Komodo PHP Regex
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
@nelsonr
nelsonr / timer.js
Created Dec 22, 2011
Timer function
View timer.js
function Timer(el, func) {
var element = '#timer',
interval = null,
callback = null,
seconds = 30;
if(el) element = el;
if(func) callback = func;
var timer = function() {
You can’t perform that action at this time.