View ccdl.command
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 | |
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 |
View real_keys.py
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
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
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
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. |
View pythagorean_factorization.py
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.7 | |
# -*- coding: utf-8 -*- | |
import math | |
import multiprocessing | |
import random | |
import time | |
from multiprocessing import Queue, Process | |
from typing import Tuple |
View optimize.sh
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 | |
# 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" |
View ccdl.command
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 | |
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 |
View wp-disable-plugin-update.php
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
<?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 ) { |
View sips-web-optimise.sh
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 | |
# 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/* |
View phpMyAdmin Export Filename Template, Including Date and Time
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
@DATABASE@__%Y-%m-%d_%H-%M-%S |
NewerOlder