This file contains 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
# replace 22 with desired port number, save and exit | |
mcedit /etc/ssh/sshd_config | |
# restart ssh service | |
service ssh restart | |
# go to vestacp admin, firewall and edit ssh port |
This file contains 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
var t = function (s, d) { | |
for (var p in d) | |
s = s.replace(new RegExp('{' + p + '}', 'g'), d[p]); | |
return s; | |
}; | |
// usage | |
t('<p>{label1}</p><p>{label2}</p>', { | |
label1: 'Value1' | |
}) |
This file contains 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
http://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/ | |
https://blarg.co.uk/blog/recursively-optimize-png-files | |
# install jpegoptim | |
apt-get update | |
apt-get install jpegoptim | |
# install optipng | |
apt-get update | |
apt-get install optipng |
This file contains 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
Show hidden characters
{ | |
"maxerr" : 50, | |
"bitwise" : false, | |
"camelcase" : true, | |
"curly" : true, | |
"eqeqeq" : true, | |
"forin" : true, | |
"freeze" : true, | |
"immed" : false, | |
"latedef" : false, |
This file contains 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 is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space |
This file contains 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
@mixin css-locks($properties, $min-vw, $max-vw, $min-value, $max-value) { | |
@each $property in $properties { | |
#{$property}: $min-value; | |
} | |
@media screen and (min-width: $min-vw) { | |
@each $property in $properties { | |
#{$property}: calc(#{$min-value} + #{strip-unit($max-value - $min-value)} * (100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}); | |
} | |
} |
This file contains 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
html { | |
font-family: -apple-system, BlinkMacSystemFont, | |
"Segoe UI", "Roboto", "Oxygen", | |
"Ubuntu", "Cantarell", "Fira Sans", | |
"Droid Sans", "Helvetica Neue", sans-serif; | |
} |
This file contains 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
@mixin css-locks($properties, $min-vw, $max-vw, $min-value, $max-value) { | |
@each $property in $properties { | |
#{$property}: $min-value; | |
} | |
@media screen and (min-width: $min-vw) { | |
@each $property in $properties { | |
#{$property}: calc(#{$min-value} + #{strip-unit($max-value - $min-value)} * (100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}); | |
} | |
} |
This file contains 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
* { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} |
This file contains 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
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
// 80% | |
function binary(N) { | |
var half = Math.floor(N / 2); | |
var r = (N % 2).toString(); | |
if(N >= 2) { |