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
alias auru 'yaourt -Syua --noconfirm' | |
alias auru 'yaourt -Syua --noconfirm' | |
alias journalctl 'sudo journalctl' | |
alias mktar 'tar -zcvf' | |
alias pacman 'sudo pacman' | |
alias pacu 'sudo pacman -Syu --noconfirm' | |
alias se 'ls /usr/bin | grep' | |
alias systemctl 'sudo systemctl' | |
alias untar 'tar -zxvf' |
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
//Условие IF | |
{$id == '1' ? '' : $url} | |
//Получение изображения через переменную с точкой ($_pls) | |
{$_pls["tv.img"] | phpthumbon : "w=300&h=200&zc=1"} | |
//Без префикса | |
{$img | phpthumbon : "w=300&h=200&zc=1"} | |
//Информация о прозводителе | |
{$_modx->makeUrl($_pls['vendor.resource'])} |
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
// Arrays | |
Array.prototype.square = function () { return this.map(function(n) { return n*n; }); } | |
Array.prototype.cube = function () { return this.map(function(n) { return n*n*n; }); } | |
Array.prototype.average = function () { return this.sum() / this.length; } | |
Array.prototype.sum = function () { return this.reduce(function(a, b) { return a + b; }, 0); } | |
Array.prototype.even = function () { return this.filter(function(item) { return 0 == item % 2; }); } | |
Array.prototype.odd = function () { return this.filter(function(item) { return 0 != item % 2; }); } | |
Array.prototype.max = function () { return Math.max.apply(null, this); } | |
Array.prototype.min = function () { return Math.min.apply(null, this); } | |
//Arguments to array |
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://172.16.2.68/Help/Api/GET-api-users-userId-groups-events_skip_take | |
{ | |
"count": 1023, | |
"next": "https://api.example.org/accounts/?limit=100&offset=500", // не обязательно | |
"previous": "https://api.example.org/accounts/?limit=100&offset=300", // не обязательно | |
"results": [ | |
{ | |
"Id": 1, | |
"UserId": 2, | |
"UserName": "sample string 3", |
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
https://wiki.archlinux.org/index.php/Installation_guide | |
https://wiki.archlinux.org/index.php/General_recommendations | |
https://wiki.archlinux.org/index.php/Beginners%27_guide | |
https://wiki.archlinux.org/index.php/Pacman Pacman guide | |
https://wiki.archlinux.org/index.php/Sudo Sudo setup | |
https://www.archlinux.org/packages/ packages list. | |
https://aur.archlinux.org/packages/?O=0&K= AUR packages list | |
http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/ Fonts tip and tricks | |
DM LXDM(gtk2 themes) or nothing |
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
import ConfigParser, mmap | |
config_file = "/usr/share/applications/google-chrome.desktop" | |
add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"] | |
option = add_string_to_each_section[0] | |
value = add_string_to_each_section[1] | |
class Fixer: | |
def check(self, cf, option, value): |