Skip to content

Instantly share code, notes, and snippets.

View techact's full-sized avatar

Suresh Rajasekaran techact

View GitHub Profile
@techact
techact / create-aws-console-user.sh
Created April 22, 2023 14:45 — forked from res0nat0r/create-aws-console-user.sh
Create AWS console user from the awscli
#!/bin/bash
# USAGE: ./create-aws-console-user.sh $GROUPNAME $USERNAME $PASSWORD
# http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi
# Create administrator group
aws iam create-group --group-name $1
@techact
techact / gist:d137227a87f9e1e2f24be843ca628402
Created November 26, 2021 05:41
Jenkins - delete offline slave nodes
Closure query = { it.name ==~ /^.*$/ }
Closure action = {
println('====================')
println("Name: ${it.name}")
println("LabelString: ${it.labelString}")
println("NumExectutors: ${it.numExecutors}")
println("RemoteFS: ${it.remoteFS}")
println("Mode: ${it.mode}")
println("RootPath: ${it.rootPath}")
println("Offline: ${it.computer.offline}")
@techact
techact / encoding.txt
Created November 25, 2021 04:14 — forked from Andrey2G/encoding.txt
Video Encoding with multiple resolutions
ffmpeg -i "c:/videos/sample.mp4
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0
-c:v libx264 -crf 22 -c:a aac -ar 48000
-filter:v:0 scale=w=480:h=360 -maxrate:v:0 600k -b:a:0 64k
-filter:v:1 scale=w=640:h=480 -maxrate:v:1 900k -b:a:1 128k
-filter:v:2 scale=w=1280:h=720 -maxrate:v:2 900k -b:a:2 128k
-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:480p v:2,a:2,name:720p"
-preset slow -hls_list_size 0 -threads 0 -f hls -hls_playlist_type event -hls_time 3
-hls_flags independent_segments -master_pl_name "name-pl.m3u8"
"c:/videos/encoded/name-%v.m3u8"
@techact
techact / remove-nodes-safely.sh
Created September 2, 2021 07:25 — forked from scarytom/remove-nodes-safely.sh
Script to safely de-register jenkins nodes usage: $ remove-nodes-safely.sh my-node-1 my-node-2 my-node-3
#!/bin/bash
set -e
set -u
CI_MASTER_URL="http://ci-1"
node_online() {
curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false'
}
@techact
techact / cka-bookmarks.html
Created August 16, 2021 12:24
cka-bookmarks
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1579618265" LAST_MODIFIED="1582022136" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
<DL><p>
@techact
techact / k8s-bookmarks-CKA-CKAD.html
Created August 16, 2021 12:12 — forked from kksudo/k8s-bookmarks-CKA-CKAD.html
A useful kubernetes bookmarks || Certified Kubernetes Application (CKA): ProTips to pass exam 2021
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1616427741" LAST_MODIFIED="1617895617" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DT><H3 ADD_DATE="1616428159" LAST_MODIFIED="1616428159">CKA special</H3>
@techact
techact / awss3deleteolderthan.sh
Created September 1, 2020 04:31 — forked from daliborgogic/awss3deleteolderthan.sh
Delete files older than n in S3
#!/bin/bash
# Usage: . ./awss3deleteolderthan.sh [bucket] [path] "20 minutes ago"
endpoint="https://ams3.digitaloceanspaces.com"
aws s3 ls s3://$1/$2 --endpoint $endpoint --recursive | while read -r line;
do
createDate=`echo $line|awk {'print $1" "$2'}`
createDate=`date -d"$createDate" +%s`
@techact
techact / GoDaddySSLHAProxy.md
Created January 5, 2018 09:54 — forked from sethwebster/GoDaddySSLHAProxy.md
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

@techact
techact / .htaccess
Created October 20, 2017 16:29 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@techact
techact / README.md
Created October 4, 2017 13:03 — forked from leonardofed/README.md
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.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed