Skip to content

Instantly share code, notes, and snippets.

@wzup
wzup / class.js
Created January 19, 2017 18:18 — forked from Maksims/class.js
Small implementation of classes with: extend, implement, and check methods
// base class
function Class() { }
// base class name
Class.prototype.className = 'Class';
// lists all parent classes and outputs JSON with it
Class.prototype.toString = function() {
var str = '';
var next = this.__proto__;
@wzup
wzup / .jshintrc
Created September 9, 2015 11:48
.jshintrc file example, minimal settings, copy/paste to root folder
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",
@wzup
wzup / .jshintrc
Created September 9, 2015 11:46
.jshintrc FULL file example, for reference
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
@wzup
wzup / .jsbeautifyrc
Last active March 30, 2023 13:40
.jsbeautifyrc file example
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"],
@wzup
wzup / .editorconfig
Last active June 9, 2021 14:03
.editorconfig file example
# ВСЕ СВОЙСТВА СМ. ВНИЗУ ФАЙЛА
# или здесь с описанием https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
#
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org
root = true
[*]
@wzup
wzup / .bashrc
Last active May 17, 2023 00:49
alias for Git Bash on Windows
# create a file C:\Users\[user]\.bashrc
# add this content
# add your onw aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
alias ls='ls -alh'
alias cdnginx='cd /c/nginx && ls'
alias cdmcga='cd /c/Users/[user]/sbox/node/mcga && ls'
alias cdfood9='cd /c/Users/[user]/sbox/node/food9 && ls'
alias cdmysql='cd /c/nginx/mysql/bin && ls'
@wzup
wzup / doskey_macros.cmd
Created September 8, 2015 12:10
Alias in Windows cmd
@ECHO OFF
REM only set your own pathes
REM read here on how to persist macroses in cmd
REM https://gist.github.com/vladikoff/38307908088d58af206b
REM http://web.archive.org/web/20140330024520/http://devblog.point2.com/2010/05/14/setup-persistent-aliases-macros-in-windows-command-prompt-cmd-exe-using-doskey/
DOSKEY cdnginx=cd C:\nginx
DOSKEY cdmysql=cd C:\nginx\mysql\bin
DOSKEY cdsbox=cd C:\Users\[user]\sbox
@wzup
wzup / html5_page_template
Created April 12, 2015 11:14
HTML5 Page Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HTML5 Page Template</title>
<!-- <link rel="stylesheet" href="css/main.css" type="text/css" /> -->
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>