Skip to content

Instantly share code, notes, and snippets.

View parthanium's full-sized avatar
:octocat:

Parth Dhar parthanium

:octocat:
View GitHub Profile
@nielsutrecht
nielsutrecht / RsaExample.java
Created December 28, 2016 14:13
Example of RSA generation, sign, verify, encryption, decryption and keystores in Java
import javax.crypto.Cipher;
import java.io.InputStream;
import java.security.*;
import java.util.Base64;
import static java.nio.charset.StandardCharsets.UTF_8;
public class RsaExample {
public static KeyPair generateKeyPair() throws Exception {
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
@bishboria
bishboria / springer-free-maths-books.md
Last active May 10, 2025 04:28
Springer made a bunch of books available for free, these were the direct links
var numberOfUsers = 3000 // the nubmer of users you want to follow (it will break after about 5000)
function harvest() {
// keep scrolling the page to the bottom
$("#search").scrollTop($("#search")[0].scrollHeight);
// get all the follow buttons
var bs = $('*[data-capture="noiseClicked"]')//.length
// figure out how many follow buttons you have
var len = bs.length
// show the number of people you have on the page because you're impatient
console.log(len)
@chklauser
chklauser / matrix.c
Created September 24, 2012 09:06
LU decomposition and matrix multiplication with OpenMP
/*
* matrix.c - Matrix computations that has been optimized by the students
*
* Copyright (c) 2011 Christian Klauser, All rights reserved
* Author: Christian Klauser <[email protected]>,
*
* I used comparatively simple algorithms for both LU-decomposition
* and the matrix multiplication involved in checking for equality.
* - My LU decomposition is based on Gaussian Elimination
* - No pivoting, will fail for pivots that are == 0