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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
class Program | |
{ | |
static void Main() |
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 tableToCSV(table) { | |
let rows = table.querySelectorAll('tr'); | |
let csv = []; | |
// Iterate through rows | |
rows.forEach((row) => { | |
let csvRow = []; | |
let cells = row.querySelectorAll('td, th'); | |
// Iterate through cells |
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 static byte[] GenerateRandomBytes(int length) | |
{ | |
// Create a byte array to hold the random values. | |
byte[] randomBytes = new byte[length]; | |
// Create a new instance of the RNGCryptoServiceProvider. | |
using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider()) | |
{ | |
// Fill the byte array with random bytes generated by RNGCryptoServiceProvider. | |
rng.GetBytes(randomBytes); |
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 | |
# Get the currently configured project from gcloud | |
CURRENT_PROJECT=$(gcloud config get-value project) | |
# Check if a project ID argument is provided, otherwise use the current project | |
PROJECT_ID="${1:-$CURRENT_PROJECT}" | |
# Ensure that a project ID is set | |
if [ -z "$PROJECT_ID" ]; then |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"id": 11409, | |
"name": "Tarot", | |
"symbol": "TAROT", | |
"slug": "tarot", | |
"tags": [], | |
"cmcRank": 6233, | |
"marketPairCount": 1, | |
"circulatingSupply": 0, |
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
Implement RestAPI server to allow you retrieve DVCH VN | |
## Database provided | |
- Mongo DB | |
mongodb+srv://user_ro:<password>@cluster0-b0cl8.gcp.mongodb.net/dvch?retryWrites=true&w=majority | |
- password: o7vv7XCpbHwJxwVW | |
This user is readonly user. it can't insert or update or delete any data from above database | |
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
set e | |
s3_folder=s3://you-bucker/your-folder | |
sftp=user@IP:/FOLDER/ | |
GPG_KEY_NAME="GPG_KEY_NAME"; | |
rm -rf ./encrypted ./csvs ./zip | |
aws s3 cp $s3_folder ./csvs --recursive | |
mkdir ./zip || 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
[ | |
"fun", | |
"people", | |
"outside", | |
"lot", | |
"boat", | |
"footy", | |
"bear", | |
"dead", | |
"special", |
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
TOKEN=[you git hub token] | |
ORG=[you ORG name] | |
curl -s https://$TOKEN:@api.github.com/orgs/$ORG/repos?per_page=200 | \ | |
grep -ioE "\"ssh_url\": \"(.*)\"" | cut -d '"' -f4 |\ | |
xargs -n 1 git clone |
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
ssh -J root@your-jumpbox root@your_server -L 8080:127.0.0.1:8080 | |
-L remoteport:host:localhost | |
Alternative, we can setup sshconfig for jummhost |
NewerOlder