Skip to content

Instantly share code, notes, and snippets.

Volkan Paksoy volkanx

View GitHub Profile
View gist:43bc0110af6000fb4b3649a5c9e8251a
Verifying that "" is my Blockstack ID.
volkanx /
Created Jun 15, 2018 — forked from leonardofed/
A curated list of AWS resources to prepare for the AWS Certifications

A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.

volkanx / Backing-Up-GitHub-Account-with-PowerShell.ps1
Created Nov 28, 2017
Backing up GitHub Account with PowerShell
View Backing-Up-GitHub-Account-with-PowerShell.ps1
$backupDirectory = '{BACKUP ROOT DIRECTORY}'
$base64Token = [System.Convert]::ToBase64String([char[]]$token)
$headers = @{
Authorization = 'Basic {0}' -f $base64Token
Set-Location -Path $backupDirectory
$page = 1
volkanx / Backing-Up-MySQL-to-AWS-S3-with-Powershell.ps1
Last active Nov 20, 2017
Backs up a MySQL database to a S3 bucket and send email notifications
View Backing-Up-MySQL-to-AWS-S3-with-Powershell.ps1
# Make sure you have AWS PowerShell module installed
# Install-Module -Name AWSPowerShell
$ErrorActionPreference = 'Stop'
# MySQL Settings
$server = '.'
$database = '<DB NAME>'
$user = '<DB USER>'
$password = '<PASSWORD>'
volkanx / automated-email-lambda
Created Oct 9, 2015
An AWS Lambda function that sends emails when invoked
View automated-email-lambda
var targetEmail = '{TARGET_EMAIL_ADDRESS}'
var fromEmail = '{FROM_EMAIL_ADDRESS}'
var sesAccessKey = '{ACCESS_KEY}'
var sesSecretKey = '{SECRET_KEY}'
exports.handler = function(event, context) {
View index.js
var bucketName = "{BUCKET_NAME}";
var fileName = "mail-automation-last-sent-date.txt";
var targetDayOfMonth = 7;
exports.handler = function(event, context) {
var async = require('async');
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
var nodemailer = require('nodemailer');
View Simpsons.cql
CREATE (homer:Character {firstname: "Homer", lastname: "Simpson"})
CREATE (marge:Character {firstname: "Marge", lastname: "Simpson"})
CREATE (lisa:Character {firstname: "Lisa", lastname: "Simpson"})
CREATE (bart:Character {firstname: "Bart", lastname: "Simpson"})
CREATE (maggie:Character {firstname: "Maggie", lastname: "Simpson"})
CREATE (homer)-[:MARRIED_TO]->(marge)
CREATE (marge)-[:MOTHER_OF]->(lisa)
CREATE (marge)-[:MOTHER_OF]->(bart)
CREATE (marge)-[:MOTHER_OF]->(maggie)
CREATE (homer)-[:FATHER_OF]->(lisa)
volkanx / analyze-nmap-output
Created Dec 15, 2014
Powershell script to analyse Nmap output
View analyze-nmap-output
. "PATH\TO\EMAIL\SCRIPT\send-email.ps1"
$tempFilePath = "C:\Temp\temp.xml"
$nmapBucketAccessKey = "ACCESS KEY"
$nmapBucketSecretKey = "SECRET KEY"
Write-Host "Reading configuration file"
$xdocConfig = [xml] (Get-Content $configPath)
volkanx / gist:f4138dac712e26b44b60
Last active Aug 29, 2015
View gist:f4138dac712e26b44b60
. ".\send-email.ps1"
# Get the last uploaded image
$latestImage = Get-S3Object -BucketName {BUCKET} `
-AccessKey {ACCESS KEY} `
-SecretKey {SECRET KEY} `
| Sort-Object LastModified -descending `
| Select -First 1
Write-Host "Last image uploaded at" $latestImage.LastModified
View gist:0c83e4418ec4e1a17bb7
function Send-Mail
$smtpServer = ""
$smtpPort = 587
$username = "{ACCESS KEY}"
You can’t perform that action at this time.