Skip to content

Instantly share code, notes, and snippets.

View Jacajack's full-sized avatar
🦄

Jacek Wieczorek Jacajack

🦄
View GitHub Profile
@Jacajack
Jacajack / cipher.c
Last active July 27, 2017 01:06
Simple LFSR cipher
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
uint64_t sr;
uint8_t *srb = (uint8_t*) &sr;
uint8_t shift( )
{
//Taps at 64, 63, 61, 60
@Jacajack
Jacajack / colorspam.js
Last active August 15, 2020 17:05
Messenger color chat change spammer
/*
Just paste into your browser javascript console while on https://www.messenger.com
Only requires right hand side menu with colors and nicknames to be opened.
I DO NOT TAKE ANY RESPONSIBILITY FOR POSSIBLE CONSEQUENCES OF USAGE OF THIS SCRIPT
Enjoy...
*/
function pick( )
{
@Jacajack
Jacajack / tgen.html
Created October 9, 2016 12:49
A simple, yet awesome (and messy) prototype terrain generator ❤️
<!DOCTYPE html>
<html>
<head>
<script src=tgen.js></script>
<style>
canvas
{
border: 1px solid black;
display: inline-block;
margin: 1px;
@Jacajack
Jacajack / comm328p.c
Created October 6, 2016 16:39
UART snippet for atmega328p
#include <avr/io.h>
#include <stdlib.h>
#include <util/delay.h>
#include <inttypes.h>
#include "comm328p.h"
//Version for atmega328
uint8_t computc( uint8_t c )
{
@Jacajack
Jacajack / adcm328.c
Last active October 3, 2016 17:35
ATmega328p ADC snippet
#include <avr/io.h>
#include <inttypes.h>
#include "adc.h"
void adcenable( )
{
//Enable ADC
ADCSRA = ( 1 << ADEN );
}
@Jacajack
Jacajack / mul.pl
Last active August 24, 2016 09:33
Numix folder icon development kit v0.0001
#!/usr/bin/perl
#If you are a Perl programmer
#Do not read this code... I beg you...
use Term::ANSIColor;
#Output sizes
my @sizes = ( 16, 22, 24, 32, 48, 64 );
@Jacajack
Jacajack / mdgist.pl
Last active August 22, 2016 10:44
Put gists in markdown file
s/<i>gist(.*?)<\/i>/<script src="https:\/\/gist\1"><\/script>/gm
@Jacajack
Jacajack / displist.awk
Last active August 19, 2016 02:29
Display formatted product list, and manage prices
#!/usr/bin/awk -f
#Sample list
#Milk <(2)[1][2.00]>
#Butter <(10)[2][1.00]>
#Basic init
BEGIN {
total = 0;
tokencnt = 0;
@Jacajack
Jacajack / eeprom.c
Created July 20, 2016 00:12
EEPROM snippet for AVR
#include <avr/io.h>
#include "../include/eeprom.h"
void eepromWrite( unsigned int address, unsigned char data )
{
//Wait for EEPROM to be ready
while ( EECR & ( 1 << EEPE ) );
EEAR = address;
EEDR = data;
@Jacajack
Jacajack / uartm328.c
Last active July 20, 2016 00:11
UART snippet for ATmega328
#include <avr/io.h>
#include <stdlib.h>
#include <util/delay.h>
#include "../include/uart.h"
//Version for atmega328
//Not used, just declared for user
char *uartBuffer;
static unsigned int uartBaud;