Skip to content

Instantly share code, notes, and snippets.

@ii0
ii0 / AndroidManifest.xml
Created August 14, 2023 01:01 — forked from codinginflow/AndroidManifest.xml
Start App on Boot Tutorial
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.codinginflow.onbootreceiverexample">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@ii0
ii0 / sshKeyGen.py
Created July 7, 2023 08:02 — forked from oliv2915/sshKeyGen.py
Python script that uses ssh-keygen and ssh-copy-id to create SSH keys
'''
Author: Brian Oliver II
Instagram: bolo_ne3
License:
MIT License
Copyright (c) 2016 Brian Oliver II
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ii0
ii0 / sshKeyGen.py
Created July 7, 2023 04:17 — forked from hugobarzano/sshKeyGen.py
Python script that uses ssh-keygen and ssh-copy-id to create SSH keys
'''
Author: Brian Oliver II
Instagram: bolo_ne3
License:
MIT License
Copyright (c) 2016 Brian Oliver II
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ii0
ii0 / import_key.py
Created May 31, 2023 00:45 — forked from mihow/import_key.py
Import existing PEM file as EC2 Key Pair with boto3 & paramiko
import os
import base64
import struct
import boto3
import paramiko
from paramiko.util import deflate_long
PEM_FILEPATH = '~/.ssh/test-key.pem'
@ii0
ii0 / install_ec2.sh
Created May 6, 2023 03:04 — forked from arttuladhar/install_ec2.sh
Installing tmux on EC2
# Installing tmux on Amazon-EC2
# If you don't have libevent install use wget to install the libevent and install
wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
tar zxf libevent-2.0.18-stable.tar.gz
sudo ./configure & sudo make install
# If you don't have curses install use yum to install the curses
@ii0
ii0 / install-tmux.sh
Created May 6, 2023 03:03 — forked from muralisc/install-tmux.sh
Install tmux 3.0a on Amazon Linux 2 / rhel /centos
# Install tmux 3.0a on Centos
# install deps
sudo yum install -y gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -xf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local
@ii0
ii0 / paramiko_example.py
Created May 5, 2023 00:41 — forked from batok/paramiko_example.py
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )
@ii0
ii0 / .gitconfig
Created April 6, 2023 05:46 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@ii0
ii0 / websocketgames.go
Created March 8, 2023 11:52 — forked from tsilvers/websocketgames.go
Golang code to send binary image data to client through a websocket connection.
package main
import (
"flag"
"fmt"
"html/template"
"log"
"net/http"
"time"
@ii0
ii0 / reconn.go
Created March 7, 2023 08:54 — forked from navono/reconn.go
websocket reconnect in golang
package reconWS
import (
"errors"
"math/rand"
"net/http"
"net/url"
"sync"
"time"