Skip to content

Instantly share code, notes, and snippets.

View cooliscool's full-sized avatar
🐼

M. Ajmal Moochingal cooliscool

🐼
View GitHub Profile
@cooliscool
cooliscool / create_dataset.py
Last active January 21, 2023 10:18
For selecting only a few number of classes from PASCAL VOC for training in Tensorflow. ( Please refer the code thoroughly :) )
PASCAL_CLASSES = [
'none',
'aeroplane',
'bicycle',
'bird',
'boat',
'bottle',
'bus',
'car',
'cat',
@cooliscool
cooliscool / removeproxy.sh
Last active August 20, 2017 18:01
Automate Setting and Removing of SSH tunnel SOCKS Proxy in Ubuntu.
# Author : Mohammed Ajmal
# GNU Public License
# Tested to work well in Ubuntu 16.04
# use ` chmod +x removeproxy.sh ` to give executable permissions
gsettings set org.gnome.system.proxy mode 'none'
@cooliscool
cooliscool / netaccess.py
Last active August 31, 2021 01:15
Approve Netaccess automatically ( for IIT Madras ).
#!/usr/bin/env python
import requests
import sys
import getpass
username = 'aexxxxxx'
print ('LDAP pass ')
pa = str(getpass.getpass())
with requests.session() as s:
page = s.post('https://netaccess.iitm.ac.in/account/login' , data={ 'userLogin':username, 'userPassword':pa, 'submit':''})
@cooliscool
cooliscool / flightgearWarrior.py
Last active October 24, 2021 09:43
To Run Flight Gear simulations
import time
import requests as g
import csv
port= 8089
hostname='localhost'
latDegToMet = 111000
metToFeet = 3.28084
radToDeg = 180/3.14159
@cooliscool
cooliscool / index.php
Created June 13, 2018 04:24
Youtube Downloader API in PHP
// Author : Mohammed Ajmal
// github.com/cooliscool
// GNU Public License
<?php
if(isset($_GET['v'])){
// $download = exec('youtube-dl '.$_GET['v']);
$comm = 'youtube-dl '.$_GET['v'].' 2>&1';
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(void)
{
printf("My UID is: %d. My GID is: %d My EUID is: %d. My EGID is: %d \n", getuid(), getgid() , geteuid(), getegid());
system("/usr/bin/id");
setuid(geteuid());
printf("My UID is: %d. My GID is: %d My EUID is: %d. My EGID is: %d \n", getuid(), getgid() , geteuid(), getegid());
system("/usr/bin/id");
@cooliscool
cooliscool / main.go
Created November 24, 2021 14:30
Pretty print JSON from stdin - Go program
package main
import ("fmt"
"encoding/json"
"os"
"bufio"
"bytes"
)
@cooliscool
cooliscool / egg_hunter.asm
Created October 27, 2022 05:22 — forked from AdityaChaudhary/egg_hunter.asm
Linux/x86 Egg Hunter
; Egg Hunter
; Author: Aditya Chaudhary
; Date: 20th Jan 2019
global _start
section .text
@cooliscool
cooliscool / jerk.py
Last active October 28, 2023 05:58
Mouse Jerk 😜
import pyautogui
import random
import time
while True:
current_x, current_y = pyautogui.position()
# Generate random x and y coordinates around the current position
new_x = current_x + random.randint(-5, 5)
new_y = current_y + random.randint(-5, 5)
@cooliscool
cooliscool / gist:85d45bbd0bf4ac50a3ed8108fbff6534
Last active December 1, 2023 01:48
Kubernetes Policy Engines

Kubernetes Policy Engines: How to Implement Security, Compliance, and Governance Policies in Your Cluster

kubernetes_captain_retouched (image generated by DALL-E)

Embarking on the journey of Kubernetes security unveils a vast landscape, encompassing crucial elements that safeguard your containerized applications. Among the intriguing facets within this realm, we delve into pivotal sections that form the bedrock of Kubernetes security:

  • RBAC Mastery: Kubernetes security begins with defining who holds the keys to the kingdom. Role-Based Access Control (RBAC) empowers you to orchestrate who wields authority over kubectl, the gateway to your Kubernetes cluster. Craft roles and permissions tailored for distinct users and groups, ensuring a finely tuned control mechanism.

  • Secrets Safeguard: The cloak of security extends to shielding your application's secrets. In the digital realm, secrets are akin to treasures — pa