Skip to content

Instantly share code, notes, and snippets.

@AlexVKO
AlexVKO / Default (OSX).sublime-keymap
Last active August 29, 2015 14:24
My sublime settings
[
{"keys": ["alt+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false}},
{"keys": ["alt+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true}},
{"keys": ["shift+alt+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}},
{"keys": ["shift+alt+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}},
{"keys": ["shift+ctrl+["], "command": "focus_group", "args": { "group": 0 } },
{"keys": ["shift+ctrl+]"], "command": "focus_group", "args": { "group": 1 } },
{"keys": ["ctrl+super+shift+["], "command": "move_to_group", "args": { "group": 0 } },
{"keys": ["ctrl+super+shift+]"], "command": "move_to_group", "args": { "group": 1 } },
]
@AlexVKO
AlexVKO / Resource.service.js
Created July 13, 2015 05:16
Make $resource respond to PUT or POST with $save
module.factory( 'Resource', [ '$resource', function( $resource ) {
return function( url, params, methods ) {
var defaults = {
update: { method: 'put', isArray: false },
create: { method: 'post' }
};
methods = angular.extend( defaults, methods );
var resource = $resource( url, params, methods );
@AlexVKO
AlexVKO / base16-eighties.dark.tmTheme
Last active August 29, 2015 14:24
base16-eighties modified
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Chris Kempson (http://chriskempson.com)</string>
<key>name</key>
<string>Base16 Eighties Dark</string>
<key>semanticClass</key>
<string>base16.eighties.dark</string>
@AlexVKO
AlexVKO / gist:f25175b9b6255d692702
Created July 15, 2015 00:11
Tip To highlight angular ng-* attributes in html
Open your theme file located at Packages/Color Scheme - Default/*.tmTheme
find <dict> tag containing <string>Tag attribute</string> and add section after
<dict>
<key>name</key>
<string>Tag ng attribute</string>
<key>scope</key>
<string>entity.other.attribute-name.ng</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
@AlexVKO
AlexVKO / HTML.tmLanguage
Last active August 29, 2015 14:24
Language HTML improved for angularjs 1.x
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>html</string>
<string>htm</string>
<string>shtml</string>
<string>xhtml</string>
@AlexVKO
AlexVKO / filters.css
Created July 19, 2015 11:45
Example of CSS webkit filters
/*Filter styles*/
.saturate {-webkit-filter: saturate(3);}
.grayscale {-webkit-filter: grayscale(100%);}
.contrast {-webkit-filter: contrast(160%);}
.brightness {-webkit-filter: brightness(0.25);}
.blur {-webkit-filter: blur(3px);}
.invert {-webkit-filter: invert(100%);}
.sepia {-webkit-filter: sepia(100%);}
.huerotate {-webkit-filter: hue-rotate(180deg);}
.rss.opacity {-webkit-filter: opacity(50%);}
@AlexVKO
AlexVKO / Thema Dark
Last active September 9, 2015 08:29
Another custom theme, focused on readability
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Chris Kempson (http://chriskempson.com)</string>
<key>name</key>
<string>Base16 Eighties Dark</string>
<key>semanticClass</key>
<string>base16.eighties.dark</string>
[
//
// TABS (REGULAR)
//
// Tab set
{
"class": "tabset_control",
"layer0.texture": "",
@AlexVKO
AlexVKO / gemfile.rb
Last active October 1, 2015 21:36
my most used Gems for Rails API
source 'https://rubygems.org'
gem 'rails', '4.2.3'
gem 'active_model_serializers' # Serialize json response
gem 'delayed_job_active_record' # Asynchronous priority queue system
gem 'figaro' # For setting environment variables
gem 'kaminari' # for pagination
gem 'newrelic_rpm' # Monitor
gem 'pg' # Posgrees Database
@AlexVKO
AlexVKO / palestra-tdc2014-florianopolis
Created October 16, 2015 23:01 — forked from brunogh/palestra-tdc2014-florianopolis
Palestras TDC 2014 - Florianópolis
Palestras TDC 2014 - Florianópolis
Watir
Lucas Prim
http://www.slideshare.net/lucasprim/apresentacao-watir
RSpec Best Friends
Mauro George
http://pt.slideshare.net/maurogeorge/rspec-best-friends-34875731