- Browse to the /Applications/.app/Contents/MacOS/ executable in Finder,
- In the context menu choose Open With, Terminal.
- To get a thread dump press Ctrl+\ in the Terminal window.
This file contains 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
<connectionStrings> | |
<add name="myConnectionString" connectionString="Data Source=HOST\INSTANCE;Initial Catalog=myDB;Integrated Security=True" providerName="System.Data.SqlClient" /> | |
</connectionStrings> |
This file contains 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
import hashlib | |
def hashfile(afile, hasher, blocksize=65536): | |
buf = afile.read(blocksize) | |
while len(buf) > 0: | |
hasher.update(buf) | |
buf = afile.read(blocksize) | |
return hasher.digest() | |
[(fname, hashfile(open(fname, 'rb'), hashlib.sha256())) for fname in fnamelst] |
This file contains 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
chflags nohidden ~/Library |
This file contains 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 Run DCMTK StoreSCP in promisucus mode | |
storescp -pm -od c:\temp 104 | |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"target": "es5", | |
"module": "commonjs", | |
"declaration": false, | |
"noImplicitAny": false, | |
"removeComments": true, | |
"noLib": false |
This file contains 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/sh | |
# python3 -m http.server --help | |
python3 -m http.server 8000 |
This file contains 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 -m commonjs -t es5 --emitDecoratorMetadata --experimentalDecorators |
This file contains 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
/** | |
* Combined class and instance inheritance in TypeScript | |
* This looks deceptively simple, but there are two layers of inheritance that's happening | |
* One is the Class inheritance. Another is the actual instance inheritance that's chained | |
* through the children array. The parent has its' instance based factory to generate its | |
* own children either daughters of sons | |
*/ | |
class person { | |
constructor(name, parent = null) { | |
this.name = name; |
This file contains 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
ClassLoader classLoader = getClass().getClassLoader(); | |
String fn = classLoader.getResource("some-file.txt").getFile(); | |
String txt = new String(Files.readAllBytes(Paths.get(fn.substring(1)))); // Skips the first / of /c:/ in Windows |
OlderNewer