View colors
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
class colors: | |
PURPLE = '\033[95m' | |
BLUE = '\033[94m' | |
GREEN = '\033[92m' | |
YELLOW = '\033[93m' | |
RED = '\033[91m' | |
CLOSE = '\033[0m' | |
BOLD = '\033[1m' |
View powershell.desktop
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
[Desktop Entry] | |
Type=Application | |
Name=PowerShell | |
Exec=/home/dev/ps.sh | |
Icon=/home/dev/powershell.png | |
Terminal=true | |
Categories=Utility; | |
Actions=NewAdminShell; | |
[Desktop Action NewAdminShell] |
View execrolepolicy.json
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": "ec2:RunInstances", | |
"Resource": [ | |
"arn:aws:ec2:*:*:subnet/*", | |
"arn:aws:ec2:us-east-1::image/*", |
View init.sh
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
#!/bin/bash | |
#root check | |
if [[ $EUID -ne 0 ]]; then | |
echo "Re-run script with sudo" | |
exit 1 | |
fi | |
#bashrc config | |
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u⛾ \h]\[\033[00m\] \[\033[01;33m\][\w]\[\033[00m\]\n└─ '" >> $HOME/.bashrc |
View ducky.ahk
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
;Arrow keys | |
RCtrl::Right | |
RWin::Down | |
RShift::Up | |
RAlt::Left | |
;Fn+F10 Fn+F11 Fn+F12 | |
SC044::Send {Media_Prev} | |
SC057::Send {Media_Play_Pause} | |
SC058::Send {Media_Next} |
View mock.py
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
from moto import mock_<service> | |
import boto3 | |
import unittest | |
class TestFooBar(unittest.TestCase): | |
def __init__(self, *args, **kwargs): | |
super(TestFooBar, self).__init__(*args, **kwargs) | |
self.client = boto3.client("<service>") | |
self.mock = mock_<service>() | |
View iam.py
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
import boto3 | |
if __name__ == "__main__": | |
session = boto3.session.Session() | |
resource = session.resource("iam") | |
[print(r.arn) for r in getattr(resource, "users").all()] | |
View ec2.py
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
import boto3 | |
if __name__ == "__main__": | |
session = boto3.session.Session(region_name="us-east-1") | |
resource = session.resource("ec2") | |
operations = resource.instances._handler.service_context.service_model.operation_names | |
[print(op) for op in operations] | |
View all.py
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
import boto3 | |
import json | |
if __name__ == "__main__": | |
apis = [] | |
session = boto3.session.Session(region_name="us-east-1") | |
[ | |
apis.append({service: list(session.client(service)._PY_TO_OP_NAME.values())}) | |
for service in session.get_available_services() |
View ExecActivator.java
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
package com.demo.exec; | |
import org.osgi.framework.BundleActivator; | |
import org.osgi.framework.BundleContext; | |
import java.lang.*; | |
public class ExecActivator implements BundleActivator { | |
@Override | |
public void start(BundleContext bundleContext) throws Exception { |
OlderNewer