- 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
#!/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
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
use somedb; | |
SET FOREIGN_KEY_CHECKS=0; | |
delete from account where firstname='8'; | |
select id, email, firstname, lastname from account; | |
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
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
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
<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
<configSections> | |
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/> | |
</configSections> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target name="console" xsi:type="Console" layout="${longdate} ${callsite} ${level} ${message}"/> | |
<target name="logfile" xsi:type="File" fileName="C:\temp\log.txt" layout="${longdate} ${callsite} ${level} ${message}"/> | |
<target name="rotatelog" xsi:type="File" | |
layout="${longdate} ${logger} ${message}" | |
fileName="c:/temp/logs/alogfile.txt" |
NewerOlder