Skip to content

Instantly share code, notes, and snippets.

Avatar

Inspired Earth inspiredearth

View GitHub Profile
@thpryrchn
thpryrchn / ccdl.command
Last active May 23, 2022 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.4 (macOS only)... Added M1 https://github.com/Drovosek01/adobe-packager if you want to install it another way.
View ccdl.command
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@maqp
maqp / real_keys.py
Last active Jan 5, 2021
Pythagorean factorization in the world of real RSA keys.
View real_keys.py
import math
import time
from cryptography.hazmat.primitives.asymmetric import rsa
def main():
key_sizes_to_test = [512, 640, 768, 896]
number_of_keys_per_size_to_generate = 10000
View gist:ced7e90f70131f95f6465a7f782acf1b
I had a chat with a buddy of mine (Topi Talvitie) who's a postdoc researcher here at Helsinki Uni.
He reverse engineered the logic on how a fake solver algorithm, such as the one by Grant's, can be created.
I've tried to to translate it the best I can:
-------------
The goal is to find integers p and q so that pq = N [N being the public key].
The problem is then rephrased so that the goal is to find a single integer C = (p+q) / 2.
This is because finding the value of a single variable appears easier than solving an equation with two variables.
@maqp
maqp / pythagorean_factorization.py
Last active Jan 4, 2021
Pythagorean Factorization
View pythagorean_factorization.py
#!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
import math
import multiprocessing
import random
import time
from multiprocessing import Queue, Process
from typing import Tuple
View optimize.sh
#!/bin/bash
# Script adapted by pduchnovsky
# https://pduchnovsky.com/2020/11/images-optimization-for-web/
# Add list of folder names to ignore array here, separated by space
ignore=("./themes/*" "./resources/*" "./assets/*")
# Array of png optimizers with their arguments
optimizers=(
"optipng -nb -nc"
@ayyybe
ayyybe / ccdl.command
Last active May 20, 2022
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
View ccdl.command
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@ebetancourt
ebetancourt / wp-disable-plugin-update.php
Last active May 19, 2022 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
View wp-disable-plugin-update.php
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
@ngearing
ngearing / sips-web-optimise.sh
Last active Dec 14, 2020
sips resize and compress images quickly
View sips-web-optimise.sh
#!/bin/bash
# cd into the directory with the images you want to resize then run this.
# install slugify with brew install slugify
mkdir resized
sips -Z 1920 -s formatOptions 65 -s format jpeg * --out resized/
slugify -acdtu resized/*
@mrkdevelopment
mrkdevelopment / In your social icons file
Last active Oct 21, 2021
Divi social icons extension
View In your social icons file
<?php if ( 'on' === et_get_option( 'divi_show_linkedin_icon', 'on' ) ) : ?>
<li class="et-social-icon et-social-linkedin">
<a href="<?php echo esc_url( et_get_option( 'divi_linkedin_url', '#' ) ); ?>" class="icon">
<span><?php esc_html_e( 'Linked In', 'Divi' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php if ( 'on' === et_get_option( 'divi_show_youtube_icon', 'on' ) ) : ?>
<li class="et-social-icon et-social-youtube">