-
Building a Second Brain: The Book - The step-by-step guide to building a Second Brain. Based on 10+ years of research & experiments with organizing our digital lives & improving our productivity.
-
Building a Second Brain: The Definitive Introductory Guide | Forte Labs - (2023/05/01) This is an introduction to Building a Second Brain, the proven method to organize your digital life and unlock your creative potential.
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
add_filter( 'wc_cart_totals_shipping_method_cost', function ( $output ) { | |
if ( false !== strpos( $output, 'free' ) || false !== strpos( $output, 'Free' ) ) { | |
$output = wc_price( 0 ); | |
} | |
return $output; |
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 |
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. |
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 |
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 |
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
# Export site database using wp db export | |
wp db export /wp-content/wordpress-dump.sql --all-tablespaces --single-transaction --quick --lock-tables=false | |
# Gzip compress the recent database export | |
gzip wordpress-dump.sql | |
# Export sites database using wp db export and gzip compress | |
wp db export --all-tablespaces --single-transaction --quick --lock-tables=false - | gzip -9 - > wordpress-dump.sql.gz |
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 ) { |
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/* |
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