Skip to content

Instantly share code, notes, and snippets.

View bitsnaps's full-sized avatar
🌍
Working @ CorpoSense

Ibrahim H. bitsnaps

🌍
Working @ CorpoSense
View GitHub Profile
@oofnikj
oofnikj / answerfile
Last active June 15, 2024 02:40
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@eRQee
eRQee / ubuntu-20.04-lts-perfect-setup.sh
Last active March 19, 2022 20:03
Ubuntu 20.04 LTS Apps Server Installation Wizard
clear
##############
# Am I root? #
##############
if [ "x$(id -u)" != 'x0' ]; then
echo 'Error: this script can only be executed by root.'
echo 'Try re-run the script after switched to root account by type "sudo su"'
exit 1
fi
@mwufi
mwufi / install_docker_in_colab.sh
Last active June 2, 2024 18:47
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@youben11
youben11 / rlwe_he_scheme.py
Last active April 22, 2024 09:07
Implementation of an homomorphic encryption scheme with numpy based on the ring learning with error problem
"""A basic homomorphic encryption scheme inspired from BFV https://eprint.iacr.org/2012/144.pdf
You can read my blog post explaining the implementation details here: https://www.ayoub-benaissa.com/blog/build-he-scheme-from-scratch-python/
Disclaimer: This implementation doesn’t neither claim to be secure nor does it follow software engineering best practices,
it is designed as simple as possible for the reader to understand the concepts behind homomorphic encryption schemes.
"""
import numpy as np
from numpy.polynomial import polynomial as poly
@kacole2
kacole2 / harbor.sh
Last active June 17, 2024 06:17
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@sujit
sujit / bypass_ssl_insecurities.py
Last active April 28, 2024 13:18
Selenium Bypass SSL Bad/Revoked Certificates
import sys
from time import sleep
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.common.exceptions import WebDriverException
from eliot import start_action, to_file, log_call
# from selenium.webdriver.common.keys import Keys
# from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# from selenium.webdriver.common.by import By
# from selenium.webdriver.support import expected_conditions as EC
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active June 12, 2024 09:53
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@Grab(group = "org.reflections", module = "reflections", version = "0.9.11")
@Grab(group = "org.slf4j", module = "slf4j-simple", version = "1.7.25")
import groovy.json.JsonOutput
import org.codehaus.groovy.reflection.GeneratedMetaMethod
import org.reflections.Reflections
def reflections = new Reflections("org.codehaus.groovy.runtime")
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect {
[
{
"name": "org.codehaus.groovy.runtime.dgm$0",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true
},
{
"name": "org.codehaus.groovy.runtime.dgm$1",
@drm317
drm317 / gist:3e2a9ce4ba1288c4fbaab1e534d71133
Last active December 4, 2023 21:42
OpenJDK 11+ on MacOS X

OpenJDK 11+ on MacOS X

Manually downloading, extracting and configuring the installation of OpenJDK 11+ is a high-maintenance exercise. Particularly if you need to install and switch between multiple versions of the JDK.

The following options for installing OpenJDK 11+ and switching between versions make the job easier..

Install with Jabba

Jabba is a Java version manager inspired by nvm (Node.js) written in Go.