| super+shift+n | new window |
| super+shift+w | close window |
| super+o | prompt open file |
| super+shift+t | reopen last file |
| super+alt+up | switch file |
| super+n | new file |
| super+s | save |
| super+shift+s | prompt save as |
| super+alt+s | save all |
| super+w | close |
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
| private var _table : Map<String, Int>? = null | |
| public val table : Map<String, Int> | |
| get() { | |
| if (_table == null) | |
| _table = HashMap() // Тип параметров выведен | |
| return _table ?: throw AssertionError("Set to null by another thread") | |
| } |
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
| var Singleton; | |
| (function() { | |
| var instance; | |
| Singleton = function() { | |
| if (typeof instance !== 'undefined') | |
| return instance; | |
| //... | |
| return instance = this; | |
| }; | |
| })(); |
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
| При активной отладке Glassfish постоянно забываешь, | |
| где его запустил и соответственно он висит и занимает необходимый порт. | |
| Прибить его можно очень просто. Найдем процесс, который занимает порт: | |
| lsof -i tcp:8181 | |
| В ответ видим: | |
| java 10362 trukhinyuri 320u IPv6 0x618942d79bb700ab 0t0 TCP *:8181 (LISTEN) | |
| Мочим гада: kill -9 10362 |
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
| watch -t -n 1 date +%T | |
| or | |
| while [ 1 ] ; do echo -en "$(date +%T)\r" ; sleep 1; done |
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
| function asyncForeach(array, fn, callback) { | |
| var completed = 0; | |
| var arrayLength = array.length; | |
| if(arrayLength === 0) { | |
| callback(); | |
| } | |
| for(var i = 0; i < arrayLength; i++) { | |
| fn(array[i], i, function() { | |
| completed++; | |
| if(completed === arrayLength) { |
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
| <server-groups> | |
| <server-group name="main-server-group" profile="full"> | |
| <jvm name="default"> | |
| <heap size="64m" max-size="512m"/> | |
| </jvm> | |
| <socket-binding-group ref="full-sockets"/> | |
| </server-group> | |
| <server-group name="other-server-group" profile="full-ha"> | |
| <jvm name="default"> | |
| <heap size="64m" max-size="512m"/> |
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
| #LoadModule security2_module modules/mod_security2.so | |
| <IfModule !mod_unique_id.c> | |
| #LoadModule unique_id_module modules/mod_unique_id.so | |
| </IfModule> | |
| <IfModule mod_security2.c> | |
| # ModSecurity Core Rules Set configuration | |
| Include modsecurity.d/*.conf | |
| Include modsecurity.d/activated_rules/*.conf | |
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
| <build> | |
| <plugins> | |
| ... | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <version>3.1</version> | |
| <executions> | |
| <execution> | |
| <id>default-compile</id> |
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 | |
| url=$1 | |
| cookie=$2 | |
| while ! `wget -c -t 0 --load-cookies=$cookie $url -O $fileName --no-check-certificate` | |
| do | |
| sleep 300 | |
| echo `date` " try to download..." | |
| done |