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
const fs = require('fs') | |
const axios = require('axios') | |
const myData = require('./result.json'); | |
const regexTitleTag = /<title>(.*)<\/title>/g; | |
const regexRedditPost = /<meta property="og:title" content\=\"(.*?")/gm; | |
async function getContentFromURL(url) { | |
let html = null | |
try { |
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
FROM ubuntu:20.04 | |
RUN apt-get update && apt-get -y install sudo | |
RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata | |
RUN adduser --disabled-password --gecos '' guest | |
RUN adduser guest sudo | |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
USER guest | |
WORKDIR /home/guest |
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
$0 = 10 (Step pulse time, microseconds) | |
$1 = 200 (Step idle delay, milliseconds) | |
$2 = 0 (Step pulse invert, mask) | |
$3 = 0 (Step direction invert, mask) | |
$4 = 0 (Invert step enable pin, boolean) | |
$5 = 0 (Invert limit pins, boolean) | |
$6 = 0 (Invert probe pin, boolean) | |
$10 = 3 (Status report options, mask) | |
$11 = 0.020 (Junction deviation, millimeters) | |
$12 = 0.002 (Arc tolerance, millimeters) |
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
provider "google" { | |
project = "your-project-name" | |
} | |
# Create new storage bucket in the US region | |
# with coldline storage | |
resource "google_storage_bucket" "static_bucket" { | |
name = "${var.project}-${var.bucket_name}" | |
location = var.bucket_region | |
storage_class = "COLDLINE" |
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 | |
# Run with source: | |
# source ./aws-getter.sh and you should be good - it will set your environment variable. | |
TEMP_FILE="/tmp/all-accounts.txt" | |
rm -rf $TEMP_FILE | |
cat ~/.aws/credentials | grep -E "\[.*?\]" | tr "[" " " | tr "]" " " | sort | uniq > $TEMP_FILE | |
INDEX=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
# create the timelapse | |
ffmpeg -r 10 -pattern_type glob -i "*.jpg" -vcodec libx264 output.mp4 |
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
while true | |
do | |
FILENAME=$(date +%Y%m%d-%H-%M-%S.jpg) | |
curl "http://192.168.15.11/cam-hi.jpg" -o "$FILENAME" --silent | |
gsutil cp $FILENAME "gs://esp32cam-timelapse/$FILENAME" | |
sleep 1; | |
rm $FILENAME | |
done |
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
http://opensecuritytraining.info/ |
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 | |
# Important: Only use if you are working on a branch by yourself otherwise it will overwrite someone updates | |
git reset --soft HEAD~1 \ | |
&& git add . && git commit -m "$1" \ | |
&& git push --force origin | |
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
echo "exit" >> ~/.bashrc |
NewerOlder