Skip to content

Instantly share code, notes, and snippets.

View viktor-ulyankin's full-sized avatar
🔥
Offer me a job

Viktor Ulyankin viktor-ulyankin

🔥
Offer me a job
View GitHub Profile

Полезные консольные команды и утилиты

  • echo [что_вывести] - вывод строки в STDOUT (например, echo $DT выведет в консоль значение переменной $DT)
  • echo [что_вывести] >&2 — вывод строки в STDERR
  • pwd — вывести путь к текущей директории
  • whoami — вывести логин текущего пользователя

Работа с файловой системой

  • cd [путь] — перейти в заданную папку
echo '<pre>';
print_r();
echo '</pre>';
var w = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth;
git log -7 --graph --oneline --name-only
(function(){
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
;if("document" in self&&!("classList" in document.createElement("_"))){(function(j){"use strict";if(!("Element" in j)){return}var a="classList",f="prototype",m=j.Element[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===""){throw new n("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(o)){throw new n("INVALID_CHARACTER_ERR","String contains an invalid character")}return c.call(p,o)},d=function(s){var r=k.call(s.getAttribute("class")||""),q=r?r.split(/\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.setAttribute("class",this.toString())}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){
@viktor-ulyankin
viktor-ulyankin / ssh.inodes
Created February 24, 2017 22:51
Сколько inode какие папки занимают в папке /www/.
ls -d1 ~/www/* | while read i; do echo -en "$i\t"; find "$i" -name "*" | wc -l; done;
(function(){
})();
@viktor-ulyankin
viktor-ulyankin / ssh.find
Created February 24, 2017 22:45
Найти файлы в /html/ с расширением .php, и вывести строки из этих файлов, содержащие слово 'organic'.
find ~/html/ -name '*.php' -exec grep organic '{}' ';'