db.votes.aggregate([{
$lookup: {
from: "users",
localField: "createdBy",
foreignField: "_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
// g++ scantest.cpp -lbluetooth | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <iostream> | |
#include <signal.h> | |
#include <bluetooth/bluetooth.h> |
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 | |
keystore=$JAVA_HOME/lib/security/cacerts | |
certs=$(keytool \ | |
-list \ | |
-keystore generic-truststore.jks \ | |
-storepass "" | grep trustedCertEntry | grep -Eo "^[^,]*") | |
while read -r cert |
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
stages: | |
- versioning | |
versioning: | |
stage: versioning | |
image: | |
name: amazonlinux:latest | |
entrypoint: [""] | |
before_script: | |
- yum install -y jq git |
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 random | |
import string | |
import datetime | |
import requests | |
import time | |
# edit the following variables | |
owner = "YOUR_ORG" | |
repo = "YOUR_REPO" | |
workflow = "dispatch.yaml" |
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 | |
if [ -z $1 ]; then | |
echo "encoded message required" | |
exit 1 | |
fi | |
aws sts decode-authorization-message --encoded-message "$1" | jq -r '.DecodedMessage' | jq '.' |
Data input :
db.users.insert([{
"_id": "1",
"Friends": [
{ "_id": "1", "gender": "male" },
{ "_id": "2", "gender": "male" },
{ "_id": "3", "gender": "male" },
{ "_id": "1", "gender": "male" },
{ "_id": "2", "gender": "male" }
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
[prod] | |
aws_secret_access_key = redacted | |
aws_access_key_id = redacted | |
[tf_temp] | |
[tf] | |
credential_process = sh -c 'mfa.sh arn:aws:iam::{account_id}:role/{role} arn:aws:iam::{account_id}:mfa/{mfa_entry} prod 2> $(tty)' |
NewerOlder