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
| SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where COMMAND <> 'Sleep' \G |
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
| SELECT @@max_heap_table_size; | |
| SET GLOBAL max_heap_table_size = 1024 * 1024 * 1024 * 2; | |
| SET max_heap_table_size = 1024 * 1024 * 1024 * 2; |
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
| #!/bin/bash | |
| perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' <(git rev-list --ancestry-path $1..$2) <(git rev-list --first-parent $1..$2) | tail -n 1 | xargs -l git show --stat |
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
| #!/bin/bash | |
| FILE=$(readlink -f $0); | |
| DIR=$(dirname $FILE) | |
| echo $FILE | |
| echo $dir |
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
| #!/bin/bash | |
| # get all files | |
| find . -type f | sort | xargs -I{} bash -c 'echo ${1:2}' -- {} | |
| # get tracked git files | |
| git ls-files | sort | |
| # ignored git files | |
| git status --ignored . |
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
| BEGIN:VCALENDAR | |
| VERSION:1.0 | |
| BEGIN:VEVENT | |
| TZID:Europe/Kiev | |
| DTSTART:20170121T110000 | |
| DTEND:20170121T130000 | |
| LOCATION:Київ, вул. Хрещатик, 36 | |
| DESCRIPTION:Форум громадських проектів міста Києва. Ярмарок громадських проектів 2.0. | |
| SUMMARY:Форум громадських проектів міста Києва. | |
| ORGANIZER;CN=Kyiv Smart City:MAILTO:[email protected] |
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
| <?php | |
| function renderListByColumns(array $list, $columnCount = 4, $columnSize = 50) | |
| { | |
| sort($list); | |
| $size = count($list); | |
| $rowSize = ceil($size / $columnCount); | |
| // pad types array |
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
| class MyClass { | |
| public: | |
| MyClass(int a) : var(a) | |
| { } | |
| void printInfo() { | |
| cout << var<<endl; | |
| cout << this->var<<endl; | |
| cout << (*this).var<<endl; | |
| } | |
| private: |
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
| #!/bin/bash | |
| mysql_config_file="~/connection.cfg"; | |
| startOffset=$1; | |
| endOffset=$2; | |
| chunkSize=$3; | |
| for ((i=$startOffset; i<=$endOffset; i=$i+$chunkSize)); | |
| do | |
| values=""; |
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
| #!/bin/bash | |
| # https://curl.haxx.se/docs/manpage.html | |
| # time_appconnect The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) | |
| # time_connect The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed. | |
| # time_namelookup The time, in seconds, it took from the start until the name resolving was completed. | |
| # time_pretransfer The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved. | |
| # time_redirect The time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3) | |
| # time_starttransfer The time, in seconds, it took from the start until the first byte was j |