pip install mechanize
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
#!/usr/bin/env python3 | |
""" | |
Python script to read a given Kubernetes Secret and export all the keys present | |
in it into separate files, base64 decoding if necessary | |
Needs one command line argument, the secret name to read | |
""" | |
import base64 | |
import pathlib |
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
// hello.c | |
#include <linux/module.h> | |
#include <linux/kernel.h> | |
// license for the module. required | |
MODULE_LICENSE("GPL"); | |
// executed when module is inserted | |
int init_module(void) | |
{ |
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
# Makefile | |
obj-m += hello.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) cleanvv |
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
# Makefile | |
obj-m += hello.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) cleanvv |
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
# 1 Jan 1901 to 31 Dec 2000 | |
# 1 Jan 1900 Monday => 1 Jan 1901 => Tuesday | |
month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
def is_leap(y): | |
return y % 400 == 0 if y % 100 == 0 else y % 4 == 0 | |
def get_month_days(y, i): | |
if is_leap(y) and i == 1: | |
return 29 |
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
# Makefile.in generated by automake 1.15 from Makefile.am. | |
# Makefile. Generated from Makefile.in by configure. | |
# Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
# This Makefile.in is free software; the Free Software Foundation | |
# gives unlimited permission to copy and/or distribute it, | |
# with or without modifications, as long as this notice is preserved. | |
# This program is distributed in the hope that it will be useful, |
Make hotspots easily
sudo apt install git
Remember credentials for approx 4 days
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
# Check for expired aircrafts | |
SELECT AcID, Mfg_Date, Type FROM AirCraft JOIN AirCraft_Type ON (AirCraft.Ac_Type = AirCraft_Type.ActID) WHERE YEAR(CURDATE()) - YEAR(Mfg_Date)> 2 LIMIT 10; | |
# Flights btw airports | |
SELECT FlId, FlightDate, Fare, Departure, Arrival FROM ((Flight_Schedule JOIN AirFare ON (Flight_Schedule.NetFare=AirFare.AfID)) ) JOIN Route ON (Route=RtID) WHERE Airport='New Delhi' AND Destination='Bangalore'; | |
# Passengers on Flight | |
SELECT Name, Age, Mobile FROM Transaction JOIN Passenger ON (Transaction.Passenger = PsID) JOIN Contact_Details ON (Contacts=CnID) WHERE Flight=5 ORDER BY Name LIMIT 10; | |
# Minor Passengers with complete address |
NewerOlder