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 off | |
| call:PullOrRecurse | |
| echo.&pause&goto:eof | |
| :PullOrRecurse - if .hg found do pull update or recursive through the folders | |
| if exist .hg call:doPull | |
| if not exist .hg FOR /d %%G in (*) DO call:doChangeDirectory %%G | |
| goto:eof |
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 | |
| #### pre-requisite curl | |
| #### assumption 1. hg web access requires user/password and values in ~/.hg-web-access.properties | |
| #### assumption 2. hg repo access url - ssh://hg@hg | |
| #### sample use - | |
| #### hgUpdateOrClone https://hg/orgname/teamrepo targetfolder '/exclude-repo1/d\;/exclude-repo1/d\;' | |
| source ~/.hg-web-access.properties |
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
| c:\cygwin\bin\bash -c "export CHERE_INVOKING=1; exec /bin/bash --login -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
| #!/bin/bash | |
| PID=$(top -n1 | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ') | |
| NID=$(printf '%x' $(top -n1 -H | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ')) | |
| jstack $PID | grep -A500 $NID | grep -m1 '^$' -B 500 |
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
| get methods | |
| ------------ | |
| (.*)(get|is)([^(]*)(.*) ----------> \2\3\(\) | |
| toString | |
| ----------- | |
| (get|is)([^(]*)(.*) -----> .add\("\2", \1\2\3\) | |
| equals | |
| ----------- |
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
| @rem - original answer from - http://stackoverflow.com/a/10227715 | |
| @cmd /c for %A in ("c:\Program Files (x86)\Internet Explorer\iexplore.exe") do @echo %~sA |
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
| find filename -printf "%TY-%Tm-%Td %TH:%TM:%TS\n" | |
| date +%F.%T.%N |
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
| declare @COL_NM_PATTERN varchar(30) | |
| declare @TAB_NM_PATTERN varchar(30) | |
| declare @DATATYPE_PATTERN varchar(30) | |
| declare @ESC varchar(1) | |
| select @TAB_NM_PATTERN = '%%', @COL_NM_PATTERN = '%%', @DATATYPE_PATTERN = '%%', @ESC = '@' | |
| -- list parent tables | |
| SELECT | |
| object_name(constraint_object_id) ConstraintName | |
| , object_name(referenced_object_id) ParentTable |
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
| #http://stackoverflow.com/a/314352 | |
| # tail from 21st line | |
| tail -n +21 myfile.txt |
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
| @C:\Software\nircmd\nircmd.exe win settopmost class Sticky_Notes_Top_Window 1 |