Skip to content

Instantly share code, notes, and snippets.

View fedir's full-sized avatar
🌤️
The sun is behind every cloud

Fedir RYKHTIK fedir

🌤️
The sun is behind every cloud
View GitHub Profile
@fedir
fedir / 1-node-sass-centos-6.sh
Last active November 16, 2018 15:04
Install node-sass on CentOS 6
yum update
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
npm install --unsafe-perm -g node-sass
type node-sass
npm install -g less
type lessc
@fedir
fedir / private-domain-with-redirects-by-ip.htaccess
Last active November 2, 2018 12:13
.htaccess, Private domain access from selected IPs only, with a redirect to fallback domain
RewriteCond %{REMOTE_ADDR} !^XX\.XX\.XX\.XX$
RewriteCond %{REMOTE_ADDR} !^XX\.XX\.XX\.XX$
RewriteCond %{HTTP_HOST} ^(private-domain) [NC]
RewriteRule ^(.*)$ http://fallback-domain$1 [R=301,L]
@fedir
fedir / google-next-2018-likes.md
Last active October 14, 2018 20:34
google-next-2018 (sorting by positive interest / likes) #yrank
@fedir
fedir / detectAtatcksInApache2Logs.sh
Last active October 9, 2018 14:14
detectAtatcksInApache2Logs.sh
#!/bin/bash
cat /var/log/apache2/access.log |grep SELECT | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20
cat /var/log/apache2/access.log |grep SELECT | tail
@fedir
fedir / detect_running_routines.go
Created September 29, 2018 21:54
Detect running routines in Go
package main
func main() {
panic(nil)
}
// Run with: GOTRACEBACK=2 go run main.go
@fedir
fedir / logFileWriterConfiguration.php
Created September 28, 2018 10:52
TYPO3 log FileWriter configuration
<?php
// Writer log configuration
$logFolder = '/path_to_log_folder/';
$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = array(
\TYPO3\CMS\Core\Log\LogLevel::EMERGENCY => array(
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => array(
'logFile' => $logFolder . 'php_0_emergencies.log'
)
),
@fedir
fedir / typo3-youtube-channel-stats-by-likes.md
Last active September 26, 2018 17:34
TYPO3 Youtube channel statistics
TITLE URL LIKES POSITIVE INTERESTINGNESS TOTAL REACTION GLOBAL BUZZ VIEWS DISLIKES COMMENTS
GopherCon EU 2018: Peter Bourgon - Best Practices for Industrial Programming https://www.youtube.com/watch?v=PTE4VJIdHPg 52 0.0284 0.0284 1831 1831 0 0
GopherCon EU 2018: Hunter Loftis - Painting With Light https://www.youtube.com/watch?v=hWANIFgssWg 48 0.0471 0.0500 1023 1020 0 3
GopherCon EU 2018: Alessandro Arzilli - Internal Architecture of Delve, a Debugger For