Skip to content

Instantly share code, notes, and snippets.

char program[] = "CUDALucas v2.06beta"; //do not change
/* CUDALucas.c
Shoichiro Yamada Oct. 2010
This is an adaptation of Richard Crandall lucdwt.c, John Sweeney MacLucasUNIX.c,
and Guillermo Ballester Valor MacLucasFFTW.c code.
Improvement From Prime95.
It also contains mfaktc code by Oliver Weihe and Eric Christenson
adapted for CUDALucas use. Such code is under the GPL, and is noted as such.
#define _LARGEFILE64_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
http://crna.cc/
https://github.com/hermanhermitage/videocoreiv
http://www.valvers.com/open-software/raspberry-pi/step01-bare-metal-programming-in-cpt1/
https://www.seanet.com/~karllunt/bareRasPi.html
https://github.com/vanvught/OpenILDA/tree/master/fb
https://archive.fosdem.org/2017/schedule/event/programming_rpi3/attachments/slides/1475/export/events/attachments/programming_rpi3/slides/1475/bare_metal_rpi3.pdf
https://github.com/osnr/rpi-kernel
https://github.com/dwelch67/raspberrypi
@Qwertylex
Qwertylex / sha512.sh
Created April 21, 2016 06:06
generates sha512 hashes for each line of a textfile: usage: sha512.sh foobar.txt
#!/bin/bash
#Alex's sha512gen v1.0
cat $1 | while read -r line; do
printf "%s" "$line" | openssl sha512 | awk '{print $2}'
done

Keybase proof

I hereby claim:

  • I am qwertylex on github.
  • I am unixbrain (https://keybase.io/unixbrain) on keybase.
  • I have a public key whose fingerprint is FB3F D334 7C77 0DEB 1DD3 D455 D8EA 11E2 4A94 E5BA

To claim this, I am signing this object:

@Qwertylex
Qwertylex / kana.sh
Created October 8, 2012 20:55
kana.sh fixed to die after giving all kanas but now not randomized
#!/bin/bash
#Alex's Kana trainer alpha0.96 (fork of my [internal] pre-alpha Hiratrainer)
#Ideas for script skeleton taken from http://tldp.org/LDP/abs/html/randomvar.html (See "Example 9-12")
#License: This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.
hiras="あ,a い,i う,u え,e お,o か,ka き,ki く,ku け,ke こ,ko さ,sa し,shi す,su せ,se そ,so た,ta ち,chi つ,tsu て,te と,to な,na に,ni ぬ,nu ね,ne の,no は,ha ひ,hi ふ,fu へ,he ほ,ho ま,ma み,mi む,mu め,me も,mo や,ya ゆ,yu よ,yo ら,ra り,ri る,ru れ,re ろ,ro わ,wa を,wo ん,n"
katas="ア,a イ,i ウ,u エ,e オ,o カ,ka キ,ki ク,ku ケ,ke コ,ko サ,sa シ,shi ス,su セ,se ソ,so タ,ta チ,chi ツ,tsu テ,te ト,to ナ,na ニ,ni ヌ,nu ネ,ne ノ,no ハ,ha ヒ,hi フ,fu ヘ,he ホ,ho マ,ma モ,mi ム,mu メ,me モ,mo ヤ,ya ユ,yu ヨ,yo ラ,ra リ,ri ル,ru レ,re ロ,ro ワ,wa ヲ,wo ン,n"
read -e -p "hira or kata: " choice
case $choice in
@Qwertylex
Qwertylex / gist:3681942
Created September 9, 2012 01:34
problem
#!/bin/bash
#Alex's Kana trainer alpha0.93 (fork of my [internal] pre-alpha Hiratrainer)
#Ideas for script skeleton taken from http://tldp.org/LDP/abs/html/randomvar.html (See "Example 9-12")
#License: This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.
echo -n "hira or kata?: "
read -e choice
hiras="あ,a い,i う,u え,e お,o か,ka き,ki く,ku け,ke こ,ko さ,sa し,shi す,su せ,se そ,so た,ta ち,chi つ,tsu て,te と,to な,na に,ni ぬ,nu ね,ne の,no は,ha ひ,hi ふ,fu へ,he ほ,ho ま,ma み,mi む,mu め,me も,mo や,ya ゆ,yu よ,yo ら,ra り,ri る,ru れ,re ろ,ro わ,wa を,wo ん,n"
katas="ア,a イ,i ウ,u エ,e オ,o カ,ka キ,ki ク,ku ケ,ke コ,ko サ,sa シ,shi ス,su セ,se ソ,so タ,ta チ,chi ツ,tsu テ,te ト,to ナ,na ニ,ni ヌ,nu ネ,ne ノ,no ハ,ha ヒ,hi フ,fu ヘ,he ホ,ho マ,ma モ,mi ム,mu メ,me モ,mo ヤ,ya ユ,yu ヨ,yo ラ,ra リ,ri ル,ru レ,re ロ,ro ワ,wa ヲ,wo ン,n"