Skip to content

Instantly share code, notes, and snippets.

@Alcotana
Alcotana / sublime_text_here.reg
Created June 4, 2017 11:40
Open directory with Sublime Text 3 using right-click menu command "Sublime Text here"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\directory\background\shell\sublime_text]
@="&Sublime here"
"Icon"="%ProgramFiles%\\Sublime Text 3\\sublime_text.exe"
[HKEY_CLASSES_ROOT\directory\background\shell\sublime_text\command]
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe \"%V\""
[HKEY_CLASSES_ROOT\directory\shell\sublime_text]
@Alcotana
Alcotana / nodejs_here.reg
Last active July 2, 2023 07:15
Open directory with "Node.js command prompt" using right-click menu command "Node.js here"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\directory\background\shell\nodejs]
"Icon"="cmd.exe"
@="&Node.js here"
[HKEY_CLASSES_ROOT\directory\background\shell\nodejs\command]
@="cmd.exe /s /k pushd \"%V\" & nodevars.bat"
[HKEY_CLASSES_ROOT\directory\shell\nodejs]
@Alcotana
Alcotana / object-classes.js
Last active September 30, 2023 03:08
Classes-like objects example (you shoud use classes, of course!)
var Foo = {
construct(who){
this.me = who;
this.species = 'fufel';
return this;
},
identify(){
return 'I am ' + this.me;
}
}
@Alcotana
Alcotana / function-classes.js
Last active May 29, 2017 00:08
Classes-like functions example
// class
function Foo(who){
// constructor
this.me = who;
this.species = 'fufel';
// methods
Object.assign(Foo.prototype, {
identify(){
return 'I am ' + this.me;
@Alcotana
Alcotana / localization.js
Created May 28, 2017 14:13
A simple example of using ES6 tagged template strings for localization purposes.
var language = 'ru';
//--------------
const langDatabases = {
en: null,
ru: new Map(),
pl: new Map()
}
@Alcotana
Alcotana / Preferences.sublime-settings
Created May 26, 2017 17:58
Sublime Text 3 - General Configuration
{
"always_show_minimap_viewport": true,
"auto_find_in_selection": true,
"caret_style": "blink",
"detect_indentation": false,
"drag_text": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"folder_exclude_patterns":