Skip to content

Instantly share code, notes, and snippets.

View vijexa's full-sized avatar
💻
Monkey with a keyboard

Viktors Nuždins vijexa

💻
Monkey with a keyboard
View GitHub Profile
@AyrA
AyrA / bfjsf.js
Last active January 23, 2025 05:47
Brainfuck interpreter in JSFuck
//Brainfuck Interpreter in JSFuck by /u/AyrA_ch
(typeof(window)==="undefined"?global:window).bf=
//Put your code in the line below
'-[----->+<]>----.-[--->++<]>+.-[++>---<]>+.---[-->+++<]>-.----[->++<]>-.-------.+[->+++++<]>++.-[-->+++<]>-.++++.+++++.';
/*
Text input is done using 'prompt' function
Text output is shown at the end of the script, because console.log adds linebreaks
The interpreter has 1000000 bytes of memory
@bloc97
bloc97 / TwoMethods.md
Last active March 2, 2025 10:14
Two Fast Methods of Generating True Random Numbers on the Arduino

Two Fast Methods of Generating True Random Numbers on the Arduino

Arduino true random number generator

B. Peng

December 2017

Abstract

The AVR series microcontrollers are a collection of cheap and versatile chips that are used in many applications ranging from hobbist projects to commercial infrastructure. One major problem for some hobbists is the lack of secure random number generation on the Arduino platform. The included pseudo-random number generator (PRNG) is very easy to defeat and is useless for any crypto-related uses. One recommendation from the Arduino Reference Manual is to use atmospheric noise from the chip's analog sensor pins as seed data[6].
Unfortunately this method is extremely weak and should not be used to emulate a true random number generator (TRNG). Existing methods such as using the internal timer drift or using a dedicated generator are either too slow, requires extensive external hardware or modifications to the microcontroller's internal mech

@owainlewis
owainlewis / Gzip.scala
Last active June 21, 2023 05:30
Gzip Scala
import java.io.{ByteArrayOutputStream, ByteArrayInputStream}
import java.util.zip.{GZIPOutputStream, GZIPInputStream}
import scala.util.Try
object Gzip {
def compress(input: Array[Byte]): Array[Byte] = {
val bos = new ByteArrayOutputStream(input.length)
val gzip = new GZIPOutputStream(bos)
@PurpleBooth
PurpleBooth / README-Template.md
Last active March 12, 2026 19:44
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@owainlewis
owainlewis / .gitignore
Created June 27, 2014 07:36
Scala gitignore
*.class
*.log
# sbt specific
.cache/
.history/
.lib/
dist/*
target/
lib_managed/