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 { getReasonPhrase } from 'http-status-codes' | |
export type ALLOWED_HTTP_STATUS_CODES = | |
| '400' | |
| '401' | |
| '403' | |
| '404' | |
| '500' | |
| '501' | |
| '502' |
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
function isZodObject(schema: z.ZodTypeAny): schema is z.AnyZodObject { | |
if (schema._def.typeName === "ZodObject") return true; | |
return false; | |
} | |
function isZodArray(schema: z.ZodTypeAny): schema is z.ZodArray<any> { | |
if (schema._def.typeName === "ZodArray") return true; | |
return 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
{ | |
"Create Schema": { | |
"prefix": "psql - Create new schema", | |
"body": [ | |
"DO $$", | |
"DECLARE", | |
"\tv_rec varchar;", | |
"\tv_schema varchar[] := array[ '$1', '$2' .... ];", | |
"BEGIN", | |
"\tFOREACH v_rec IN ARRAY v_schema", |
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 addUnloadEvent = function(unloadEvent, device) { | |
// device is a object containing parsed user-agent information | |
var executed = false, | |
exec = function() { | |
if (!executed) { | |
executed = true; | |
unloadEvent(); | |
} |
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
version: "3.1" | |
services: | |
redis-master-1: | |
build: ./ | |
networks: | |
redisnet: | |
ipv4_address: 10.0.0.2 | |
command: sh -c "redis-server /src/redis.conf --port 7000 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000" | |
redis-master-2: | |
build: ./ |
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
ko.subscribable.fn.subscribeChanged = function(callback) { | |
if (!this.previousValueSubscription) { | |
this.previousValueSubscription = this.subscribe(function(_previousValue) { | |
this.previousValue = _previousValue; | |
}, this, 'beforeChange'); | |
} | |
return this.subscribe(function(latestValue) { | |
callback(latestValue, this.previousValue); | |
}, this); | |
}; |
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 project_name = "YOUR_PROJECT_NAME", | |
project_url = 'YOUR_GIT_URL', | |
project_destination_server = 'USER@SERVER', | |
project_destination_dir = '/PROJECT_DIRECTORY', | |
webhookUri = "SLACK_TOKEN_URI", | |
Slack = require('slack-node'), | |
slack = new Slack(), | |
notify = function(text) { | |
slack.webhook({ | |
channel: "#notifications", |
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
// Identify User | |
ax.user({ | |
id: "USER ID", //If the id is an email AIDAX will contextalize the id | |
properties: { | |
property1: "value", | |
property2: "value" | |
}, | |
migrate: true //optional parameter to migrate old user data in this session to the new user. Default is true | |
}); |
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
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: Version: rethinkdb 2.3.6-0RC1-5-g4f0bd9 (GCC 4.8.3) | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Error in src/clustering/administration/namespace_interface_repository.cc at line 177: | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Guarantee failed: [cache_entry->ref_count == 0] | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Backtrace: | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: Version: rethinkdb 2.3.6-0RC1-5-g4f0bd9 (GCC 4.8.3) | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Error in src/clustering/administration/namespace_interface_repository.cc at line 177: | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Guarantee failed: [cache_entry->ref_count == 0] | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Backtrace: | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: Version: rethinkdb 2.3.6-0RC1-5-g4f0bd9 (GCC 4.8.3) | |
Jul 14 17:51:33 aidax-rethinkdb-5 rethinkdb[16510]: error: Error in |
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
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: Server got SIGTERM from pid 1, uid 0; shutting down... | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: Shutting down client connections... | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: All client connections closed. | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: Shutting down storage engine... (This may take a while if you had a lot of unflushed data in the writeback cache.) | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: pure virtual method called | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: Version: rethinkdb 2.3.5 (GCC 4.8.5) | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: error: Error in src/errors.cc at line 167: | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: error: std::terminate() called without any exception. | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: error: Backtrace: | |
Jun 28 18:31:01 aidax-rethinkdb-1 rethinkdb[1472]: Version: rethinkdb 2.3.5 (GCC 4.8.5) |
NewerOlder