This file contains hidden or 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
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
This file contains hidden or 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
| # DISCLAMER | |
| # It's just a good point to start. It works well even under load, | |
| # and tested on CentOS 7.2.1151 with 4G RAM and 8 xeon cores | |
| # and disabled transparent_hugepages. | |
| # Limitation of Liability. In no event and under no legal theory, | |
| # whether in tort (including negligence), contract, or otherwise, | |
| # unless required by applicable law (such as deliberate and grossly | |
| # negligent acts) or agreed to in writing, shall any Contributor be | |
| # liable to You for damages, including any direct, indirect, special, |
This file contains hidden or 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
| <script src="https://unpkg.com/@webcomponents/custom-elements"></script> | |
| <style> | |
| body { | |
| margin: 0; | |
| } | |
| /* Style the element from the outside */ | |
| /* | |
| fancy-tabs { | |
| margin-bottom: 32px; |
This file contains hidden or 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
| echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop | |
| echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop | |
| echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop | |
| echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop | |
| echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop | |
| gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2 | |
| gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false | |
| tracker reset --hard |
This file contains hidden or 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
| [...document.querySelectorAll('.invite-card')].forEach(card => { | |
| const headline = card.querySelector('.headline').textContent; | |
| const accept = card.querySelector('.bt-invite-accept'); | |
| const decline = card.querySelector('.bt-invite-decline'); | |
| const name = card.querySelector('.name').textContent; | |
| if(headline.match(/recruit/gi)) { | |
| console.log(`Nah. ${name} looks a little fishy to me. 🚷🚷🚷`); | |
| decline.click(); | |
| } else { |
This file contains hidden or 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
| /* | |
| * Динамическая сетка | |
| * Внедряется подмешиванием DOM-узлу поведенческих классов: grid_col_3, grid_cell... | |
| */ | |
| .grid | |
| box-sizing border-box | |
| /* | |
| * Генерирует стили для сетки |
This file contains hidden or 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
| // Continuously higlights the custom elements on the page. This is useful | |
| // if new custom elements are lazy loaded later on or you have a SPA | |
| // that uses other elements. | |
| // CE finding code from: https://gist.github.com/ebidel/4bdbe9db55d8a775d0a4 | |
| (function() { | |
| let cache = []; | |
| function highlightCustomElements() { |
This file contains hidden or 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
| WITH | |
| -- write the new values | |
| n(ip,visits,clicks) AS ( | |
| VALUES ('192.168.1.1',2,12), | |
| ('192.168.1.2',6,18), | |
| ('192.168.1.3',3,4) | |
| ), | |
| -- update existing rows | |
| upsert AS ( | |
| UPDATE page_views o |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/text/encoding/charmap" | |
| ) | |
| func main() { | |
| for i := 0; i <= 255; i++ { | |
| charnum := uint8(i) |
This file contains hidden or 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
| user www-data; | |
| worker_processes auto; | |
| pid /run/nginx.pid; | |
| events { | |
| worker_connections 8000; | |
| # multi_accept on; | |
| } | |
| http { |