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
services: | |
db: | |
image: postgres:12 # CockroachDB cluster might be a better fit for production deployment | |
restart: always | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: squid-archive | |
ingest: |
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
Attaching to subsquid-subspace_ingest_1, subsquid-subspace_gateway_1, subsquid-subspace_explorer_1, subsquid-subspace_db_1 | |
db_1 | The files belonging to this database system will be owned by user "postgres". | |
db_1 | This user must also own the server process. | |
db_1 | | |
db_1 | The database cluster will be initialized with locale "en_US.utf8". | |
db_1 | The default database encoding has accordingly been set to "UTF8". | |
db_1 | The default text search configuration will be set to "english". | |
db_1 | | |
db_1 | Data page checksums are disabled. | |
db_1 | |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting] | |
"ForceQueue"=dword:00000001 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent] | |
"DefaultConsent"=dword:00000001 |
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
public class FastScanner implements Iterator<String>, Iterable<String>, Closeable { | |
private Reader reader; | |
private StringBuilder sb = new StringBuilder(); | |
private char[] buf = new char[4096]; | |
private char current; | |
private int beg = 0; | |
private int end = 0; | |
public FastScanner(Reader reader) { | |
this.reader = reader; |
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 javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBException; | |
import javax.xml.bind.Marshaller; | |
import javax.xml.bind.Unmarshaller; | |
import java.io.File; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.concurrent.Callable; | |
/** |
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 org.kohsuke.args4j.ClassParser; | |
import org.kohsuke.args4j.CmdLineException; | |
import org.kohsuke.args4j.CmdLineParser; | |
import org.kohsuke.args4j.Option; | |
import java.io.PrintStream; | |
import java.io.StringWriter; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; |
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
--============================================ | |
--View Locking in Current Database | |
--Author: Timothy Ford | |
--http://thesqlagentman.com | |
--============================================ | |
SELECT DTL.resource_type, | |
CASE | |
WHEN DTL.resource_type IN ('DATABASE', 'FILE', 'METADATA') THEN DTL.resource_type | |
WHEN DTL.resource_type = 'OBJECT' THEN OBJECT_NAME(DTL.resource_associated_entity_id, SP.[dbid]) | |
WHEN DTL.resource_type IN ('KEY', 'PAGE', 'RID') THEN |
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
-- credits - http://stackoverflow.com/questions/483193/how-can-i-list-all-foreign-keys-referencing-a-given-table-in-sql-server | |
SELECT obj.name AS FK_NAME, | |
sch.name AS [schema_name], | |
tab1.name AS [table], | |
col1.name AS [column], | |
tab2.name AS [referenced_table], | |
col2.name AS [referenced_column] | |
FROM sys.foreign_key_columns fkc | |
INNER JOIN sys.objects obj | |
ON obj.object_id = fkc.constraint_object_id |
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
var Suite = require('benchmark').Suite | |
function startsWith(prefix, str) { | |
for (var i = 0; i < prefix.length; i++) { | |
if (prefix[i] != str[i]) return false | |
} | |
return true | |
} | |
var suite = new Suite |
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
var Flow = require('make-flow') | |
var crypto = require('crypto') | |
function Hash (str) { | |
var salt = '%9023t89gisuhslKLJifsdjl;apasfk<klas,Q%G@0jq39' | |
return crypto.createHash('sha256').update(salt + str).digest('hex') | |
} | |
var login = Flow() | |
.def('users', function (done) { |
NewerOlder