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 os | |
import filecmp | |
import re | |
codes = {200: 'success', 404: 'file_name not found', | |
400: 'error', 408: 'timeout'} | |
class program: | |
"""Class that handles all nitty gritties of a user program""" |
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
# Find the partition that contains messages from this connector name. Usually by grepping | |
kafkacat -C -Z -b localhost -t <connect.offsets.topics> -o <number> | grep "servername" | |
# Set an null offset. | |
echo '["<connector-name",{"server":"<servername>"}]|' \| | |
kafkacat -P -Z -b localhost -t <connect.offsets.topics> -K \| | |
-p <partition> |
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/bash | |
ROOT_UID=0 | |
SUCCESS=0 | |
E_USEREXISTS=70 | |
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway) | |
if [ "$UID" -ne "$ROOT_UID" ] | |
then | |
echo "Must be root to run this script." | |
exit $E_NOTROOT |
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 java.lang.reflect.Field; | |
import java.lang.reflect.ParameterizedType; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.stream.IntStream; | |
import org.apache.commons.lang3.ClassUtils; |
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
-- myTable has over millions of rows | |
-- create index on a column first | |
create index idx_updated_at on `myDatabase.myTable`(updated_at); | |
-- now the column can be safely used as an override | |
-- "snapshot.select.statement.overrides.myDatabase.myTable": | |
-- "select * from `myDatabase.myTable` where updated_at > \"2021-02-01 18:00:00\"", |
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
{ | |
"info": { | |
"_postman_id": "cb2d48b5-a05b-4f9b-85d7-50f2d1f35f23", | |
"name": "JWT Auth", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Register a User", | |
"request": { |
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
{ | |
"info": { | |
"_postman_id": "cb2d48b5-a05b-4f9b-85d7-50f2d1f35f23", | |
"name": "JWT Auth", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Register a User", | |
"request": { |
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
diff --git a/main.go b/main.go | |
index 3d28cfa..ad7a3c2 100644 | |
--- a/main.go | |
+++ b/main.go | |
@@ -1,6 +1,7 @@ | |
package main | |
import ( | |
+ "database/sql" | |
"time" |
NewerOlder