Skip to content

Instantly share code, notes, and snippets.

View PavloKovalov's full-sized avatar
🇺🇦
https://t.me/js_kitchen

Pavlo Kovalov PavloKovalov

🇺🇦
https://t.me/js_kitchen
View GitHub Profile
@PavloKovalov
PavloKovalov / fixmode.sh
Last active December 21, 2015 01:39
this script revokes world writable permissions from files and folders, and unset executable flag from files
#!/bin/bash
# one-liner: curl -s https://gist.github.com/PavloKovalov/6229214/raw/413074b01ed17ddba7de1eec5cfe6072212a23fa/fixmode.sh | bash -
find . -type f -perm 0666 -exec chmod 644 {} \;
find . -type f -perm 0777 -exec chmod 644 {} \;
find . -type d -perm 0777 -exec chmod 755 {} \;
@PavloKovalov
PavloKovalov / default.conf
Last active December 30, 2015 19:19
Nginx wildcard config for php-backed application development. With xip.io support
server {
listen 80;
server_name localhost ~^(www\.)?(?<domain>.*\.dev)(.*\.xip\.io)?$ ;
root /home/pavel/www/$domain;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
@import url(http://fonts.googleapis.com/css?family=Arimo:400,700,400italic,700italic);
* {
margin: 0;
padding: 0;
outline: none;
border: none;
background: transparent;
vertical-align: baseline;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
// Определение версии Internet Explorer (IE) в JavaScript
// Источник: http://tanalin.com/articles/ie-version-js/
if (document.all && !document.querySelector) {
alert('IE7 или ниже');
}
if (document.all && document.querySelector && !document.addEventListener) {
alert('IE8');
}
@PavloKovalov
PavloKovalov / etc_sudoers
Created July 31, 2018 11:56
Symantec Endpoint Protection launcher for macos
%USERNAME% ALL=NOPASSWD: /usr/local/bin/sep