I hereby claim:
- I am akosma on github.
- I am akosma (https://keybase.io/akosma) on keybase.
- I have a public key ASD3nctEKdTdOtsuicQgUcCHHFIRBrAZQ4_oXfODcBnHqAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
cmake_minimum_required(VERSION 3.6) | |
project(bookdraw) | |
set(CMAKE_CXX_STANDARD 14) | |
set(SOURCE_FILES main.cpp) | |
add_executable(bookdraw ${SOURCE_FILES}) |
/* | |
CmakeLists.txt: | |
cmake_minimum_required(VERSION 3.6) | |
project(rsa) | |
set(CMAKE_CXX_STANDARD 14) | |
set(SOURCE_FILES main.cpp) | |
add_executable(rsa ${SOURCE_FILES}) | |
target_link_libraries(rsa gmpxx gmp) | |
*/ |
/* | |
CmakeLists.txt: | |
cmake_minimum_required(VERSION 3.6) | |
project(rsa) | |
set(CMAKE_C_STANDARD 11) | |
set(SOURCE_FILES main.c) | |
add_executable(rsa ${SOURCE_FILES}) | |
target_link_libraries(rsa gmp) | |
*/ |
<?php | |
// Very, very, VERY inefficient (but clear and easy to follow) implementation | |
// of encryption and decryption using the RSA algorithm. | |
// FOR LEARNING PURPOSES ONLY | |
// Tested with PHP 5.6+ | |
// Uses the BC Math libraries to handle large numbers: http://php.net/manual/en/book.bc.php | |
// Run on the command line: `$ php RSA.php` | |
// https://www.reddit.com/r/PHPhelp/comments/1gztrp/question_calculate_modular_multiplicative_inverse/ | |
function mod_inv($a, $b) { |
#!/usr/bin/env python | |
import csv | |
import sys | |
if len(sys.argv) < 2: | |
print('Requires a file as parameter') | |
exit(1) | |
# Courtesy of |
#!/usr/bin/env xcrun swift | |
// Adapted from | |
// https://forums.developer.apple.com/thread/5137 | |
// https://joearms.github.io/2016/01/04/fun-with-swift.html | |
import WebKit | |
class ApplicationDelegate: NSObject, NSApplicationDelegate { | |
internal var window: NSWindow |
// Set operations taken from | |
// https://en.wikipedia.org/wiki/Set_(mathematics) | |
import Foundation | |
// The empty set | |
let Ø = NSSet() | |
// The "Universal" set | |
let U = NSMutableSet() |
<?php | |
/* | |
* Author: Adrian Kosmaczewski. | |
* License: BSD. | |
* | |
* This script generates a ZIP file with the contents of the current folder, | |
* without including files ending in *.zip, .DS_Store or this script itself. | |
* | |
* To actually request the file, call it using the "?download" key after the | |
* script name. This will generate and download the file immediately. |