Skip to content

Instantly share code, notes, and snippets.

View iCloud's full-sized avatar

Evgeny Penkov iCloud

View GitHub Profile
@iCloud
iCloud / chrome_icon_fixer
Last active September 16, 2015 22:57 — forked from rashkur/chrome_icon_fixer
chrome icon fixer
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):
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
@iCloud
iCloud / json.json
Created December 10, 2015 09:20
json
// 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",
@iCloud
iCloud / test.js
Last active February 3, 2016 15:10
Snippets for CodeWars
// 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
@iCloud
iCloud / image_fenom.php
Created March 15, 2018 05:56 — forked from zhabinka/image_fenom.php
Fenom: - работа с объектом vendor, - массив шаблонов, - работа с изображением, - условие IF, - вывод MIGX - foreach
//Условие 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'])}
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'