Skip to content

Instantly share code, notes, and snippets.

View Jacajack's full-sized avatar
🦄

Jacek Wieczorek Jacajack

🦄
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / 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 / combat.js
Created January 12, 2017 20:26
Simple, old combat simulator
function Buffs( )
{
this.Bleeding = 0;
this.Death = false;
this.Blinded = false;
this.Suffocating = 0;
this.Fallen = false;
this.Pain = 0;
}
@Jacajack
Jacajack / cipher.c
Created January 16, 2017 00:41
Super simple LFSR cipher in C
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
uint64_t sr;
uint8_t shift( )
{
//Taps at 64, 63, 61, 60
uint8_t shiftin = 0;
@Jacajack
Jacajack / ppmtovga.py
Created January 16, 2017 00:44
PPM to raw VGA (or whatever, 320x200) data in assembly format. Never tested
#!/usr/bin/python
width = 320
height = 200
with open( "splash.ppm", "r" ) as fin:
ppm = fin.read( ).splitlines( True )
#print( ppm[4] );