%s/\(-\)\(\w\)/\U\2/g
- replace something like font-size to fontSize%s/\(: \)\(.\+\);/\1"\2",/g
- replace something like25px;
to"25px",
fontSize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const React = require('react'); | |
const ReactDOM = require('react-dom'); | |
export class Counter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {count: props.initialCount}; | |
this.tick = this.tick.bind(this); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
let rem = true; | |
for(let i = 1; i<101; ++i){ | |
if(!(i%3)){console.log("Fizz"); rem = false;}; | |
if(!(i%5)){console.log("Buzz"); rem = false;}; | |
if(!(i%15)){console.log("FizzBuzz"); rem = false;}; | |
if(rem)console.log(i); | |
rem = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ecmaVersion": 6, | |
"defs": [ | |
"browser", | |
"ecma5", | |
"ecma6" | |
], | |
"dontLoad": [ | |
"node_modules/**" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;.editorconfig | |
root = true | |
[**.js] | |
; path to optional external js beautifier, default is vim-jsbeautify/plugin/lib | |
path=/usr/local/lib/node_modules/js-beautify/js/lib/beautify.js | |
; Javascript interpreter to be invoked by default 'node' | |
bin = node | |
e4x = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const objects = [{ | |
channel: { | |
id: "first" | |
} | |
}, { | |
channel: { | |
id: "second", | |
props: "old value" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const shool_rating = [ | |
"Вова Петькин 2 2 3", | |
"Митька Залупкин 2 2 2", | |
"Антон Газенвагович 5 5 3", | |
"Антон Залупкин 2 2 3", | |
"Вова Залупкин 2 4 3", | |
"Вова Петькин 3 3 2" | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const abstract_object = { | |
first_pro : "first", | |
second_pro : "second", | |
third_pro : "third" | |
}; | |
Object.keys(abstract_object).map((num, index) => { | |
abstract_object[num] = index+1; | |
}); | |
console.log(abstract_object); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
int current_sum = 0; | |
/* return pointer on vector with random numbers*/ | |
int* get_rnd1d_vector(const int *count_num, const int *max_num){/*{{{*/ | |
int* vector = malloc((*count_num) * sizeof(int)); | |
for (int i = 0; i < (*count_num); ++i) |
: w !sudo tee % > /dev/null