Skip to content

Instantly share code, notes, and snippets.

@prasincs
prasincs / zkhack2024_IV_puzzleF1_writeup.md
Last active February 7, 2024 04:36 — forked from niooss-ledger/zkhack2024_IV_puzzleF1_writeup.md
Write-up for ZK Hack IV puzzle F1: Gamma Ray
@prasincs
prasincs / aws_checklist.md
Last active June 28, 2021 18:12
AWS Secure Account Initial Setup Checklist

Creating Secure AWS Account Checklist

[ ] Add MFA for Root account

[ ] Create Password Policy Compliant with CIS Foundations

[ ] Create IAM Master and Manager Roles

[ ] Enable AWS Config

@prasincs
prasincs / evident_search_buckets.rb
Created May 24, 2018 12:16
Searching Unencrypted Buckets quickly and remediate
# Requires ESP_ACCESS_KEY_ID, ESP_SECRET_ACCESS_KEY environment variables
require 'esp_sdk'
require 'open3'
def bucket_encrypted? (bucket)
stdout, stderr, status = Open3.capture3("aws s3api get-bucket-encryption --bucket #{bucket}")
status==0
end
reports = ESP::Report.all
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/url"
"time"
#!/usr/bin/sh
# git-distance-based SEMVER
#
# Optional Flag: -t to cause the script to actually tag the github repo
# Using -t will cause the original behavior of Jerry's version.
# Not using -t will not touch the github repo or tags. Just will set the VERSION output and VERSION file
#
# Optional Argument: path to VERSION file. Defaults to VERSION in the current director
# major and minor, once released, are designated by add RELEASE-vx.y tag and the patch will be derived based on distance to that tag
@prasincs
prasincs / qubole_snippet
Created November 16, 2017 21:21
Quark Examples
[qubole-example]
deployment_environment: qubole
master: https://api.qubole.com/api/v1.2
# custom remote services are prefixed with <name>- they're only looked at
# if the deployment_environment matches the prefix
# To be filled by environment variables
qubole-auth_token: %(QUBOLE_API_TOKEN)s
qubole-cluster_id: 1111
# This needs to be changed at some point
qubole-py_files: /tmp/mist.zip
#!/usr/bin/env bash
CURDIR="$( cd "$( dirname "$0" )" && pwd )"
DOMAIN=$1
mkdir -p $CURDIR/zones/$DOMAIN
zone_id=$(aws route53 list-hosted-zones-by-name --dns-name $DOMAIN --output text | grep HOSTEDZONES | awk '{gsub("/hostedzone/","",$3); print $3}'| head -n1)
domains=$(aws route53 list-resource-record-sets --hosted-zone-id $zone_id --query 'ResourceRecordSets[*].Name' --output text | xargs -n1 | sort -u | xargs)
for addr in $(echo $domains); do
addr=$(echo $addr | tr -d '"' )
# remove the last character
@prasincs
prasincs / xmonad.hs
Last active October 23, 2017 07:32
Learning to walk again, I believe I have waited long enough... where do I begin?
module Main where
import XMonad
import XMonad.Config.Gnome
import XMonad.Util.EZConfig
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Fullscreen
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
@prasincs
prasincs / notes.org
Created October 9, 2017 15:57
Notes on installing Ubuntu with GNOME on Lenovo Thinkpad X1 (Gen 5)

Installing the OS

  • Had a lot of trouble with the defaults in Debian when I tried dual booting
  • Installed Ubuntu with full disk encryption and it’s still pretty fast

Installing GNOME and getting rid of Unity

  • apt-get install ubuntu-gnome-desktop
  • Restart
  • You have to uninstall unity too for a full switch. Don’t bother with purge
  • apt-get remove unity