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 | |
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
# This script needs to be run from the volume you wish to use. | |
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright © 2012 Thomas TEMPÉ, <[email protected]> | |
# Copyright © 2014 Alex Griffin, <[email protected]> | |
# | |
# DWTFYW license. | |
# Do what the fuck you want with this file. | |
import string |
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 selenium import webdriver | |
profile = webdriver.FirefoxProfile() | |
# Set proxy settings to manual | |
profile.set_preference('network.proxy.type', 1) | |
# Set proxy to Tor client on localhost | |
profile.set_preference('network.proxy.socks', '127.0.0.1') | |
profile.set_preference('network.proxy.socks_port', 9050) | |
# Disable all images from loading, speeds page loading | |
# http://kb.mozillazine.org/Permissions.default.image |
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
<div id="swipezone"> | |
Swipe me | |
</div> | |
// credit: http://www.javascriptkit.com/javatutors/touchevents2.shtml | |
function swipedetect(el, callback){ | |
var touchsurface = el, | |
swipedir, | |
startX, |
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 | |
import sys, os, socket | |
from socketserver import ThreadingMixIn | |
from http.server import SimpleHTTPRequestHandler, HTTPServer | |
HOST = socket.gethostname() | |
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer): | |
pass |
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
cd /tmp | |
fileName='go1.20.5.linux-armv6l.tar.gz' | |
wget -c https://go.dev/dl/$fileName && sudo rm -rfv /usr/local/go && sudo tar -C /usr/local -xvf $fileName | |
grep -q 'GOPATH=' ~/.bashrc || cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
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
cd $HOME | |
file='go1.14.2.linux-armv6l.tar.gz' | |
wget "https://dl.google.com/go/$file" | |
sudo tar -C /usr/local -xvf "$file" | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
import os | |
# function to take care of downloading file | |
def enable_download_headless(browser,download_dir): | |
browser.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command') | |
params = {'cmd':'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_dir}} | |
browser.execute("send_command", params) |
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 | |
# -*- coding: utf-8 -*- | |
from Crypto.Cipher import AES | |
import base64 | |
import re | |
class AesCbc: |
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 | |
from math import floor | |
import struct | |
mp3_bit_rates = { | |
0b0001: 32000, | |
0b0010: 40000, | |
0b0011: 48000, | |
0b0100: 56000, | |
0b0101: 64000, |
OlderNewer