Skip to content

Instantly share code, notes, and snippets.

View Kreijstal's full-sized avatar
↗️

Kreijstal Kreijstal

↗️
View GitHub Profile
@Kreijstal
Kreijstal / gist:8381767
Created January 12, 2014 06:49
Infacy, Infame, Fame, Gloriusity, Treason, anonymous, Do Or Deer, animation, skill, skilless, resource, history. I love you ;_;
This file has been truncated, but you can view the full file.
[5/22/2013 7:12:27 AM] *** For A 1000 Years added Hergest Ridge, lizombie, porkboyo, Rainb ***
[5/22/2013 7:12:34 AM] For A 1000 Years: Okay. We /mlp/ now.
[5/22/2013 7:12:42 AM] Santa Melón de los Negros: oh boy
[5/22/2013 7:13:02 AM] Santa Melón de los Negros: wait, holy shit
[5/22/2013 7:13:02 AM] For A 1000 Years: That's another thing: As long as I'm on this project, we won't stop being /mlp/. As much as people hate that.
[5/22/2013 7:13:06 AM] Santa Melón de los Negros: I created this room?
[5/22/2013 7:13:06 AM] swimmin in pones: That's the spirit.
[5/22/2013 7:13:33 AM] Santa Melón de los Negros: we love you FATY-senpai
[5/22/2013 7:13:43 AM] For A 1000 Years: Even if we stop calling this "the /mlp/ episode" it's what people will remember it for.
[5/22/2013 7:13:52 AM] Santa Melón de los Negros: [Wednesday, May 22, 2013 7:12 AM] sys:
/<\/?\w[\w\d]*(?:([^>"']|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'))*>|<!--[\S\s]*?-->/
function UnicodeToUTF8Array(UnicodeValue) {//Only 1 unicode value!!!!!! //Char Number Range as called from the RFC
//Converts Unicode number or character.toCharCodeAt() to an "UTF8 array"
//After this has been done, converting to UTF-8 is just trivial, just call UTF8ArrayToUTF8
//JavaScript cannot "convert" strings to UTF-8 so we're just using byte arrays to save the information in case we need to save it to a file
/*Q:So why converting from Unicode to UTF-8 takes two functions? How is that a good Idea?
A:Well, I just thought that it could be really nice for debugging purposes, also knowing what the hell the String is converted to before being converted to*/
var thearr = [];
if (UnicodeValue > 0x7FFFFFFF) {
throw new Error("Value cannot be greater than " + 0x7FFFFFFF);
/*You should remove this, if you don't like errors much, it will be annoying to enclose everything
How to understand brainfuck?
It's easy, imagine a list, this lists has all it's values (contents) default to 0.
The length of the array (the list) depends on the system where brainfuck is run, in some systems it's a loop, in others the array can extend undefinetively
Now there are commands you use to change those values and move the pointer.
The pointer is the index of the array you're currently using.
There are 4 basic operators that are easy to learn
+ : Adds +1 on the index the pointer indicates
- : Decreases -1 on the index the pointer indicates
@Kreijstal
Kreijstal / Cebollachanpost.js
Last active August 29, 2015 14:04
Continues to send requests, to see when cebollachan is up again.
function getForm(asdf){
var div=document.createElement('div');
div.innerHTML=asdf;
return div.getElementsByTagName("form")[0];
}
function removeElement(element){
element&&element.parentNode.removeChild(element);
}
function HTTPRequestRetry(link,success,requesttype,post,headers,attemptsleft,failure){
@Kreijstal
Kreijstal / makeElem.js
Created August 1, 2014 19:12
Creates a new element.
function makeElem(elem, attributes, childnodes) {
var e = document.createElement(elem),l;
for (var a in attributes) {
if (a == "style") {
for (var d in attributes[a]) {
e.style[d] = attributes[a][d];
}
continue;
}
if (a == "__properties") {
@Kreijstal
Kreijstal / esslib.js
Last active July 24, 2016 07:29
Essential library
//Usage:
/*
Create Element:
$Rainb.el('div',{'attribute':"value",style:{"color":"red"}},[ (childnodes) ])
becomes: <div attribute="value" style="color: red;"></div>
Append Element
$Rainb.add(element,elementToAppend)
Get Element By Id
$Rainb.id(id);
Create TextNode
@Kreijstal
Kreijstal / Notify,js
Created August 5, 2014 00:42
Notify wrapper
var Notify=function (w, d) {
'use strict';
function Notify(title, options) {
if (typeof title !== 'string') {
throw new Error('Notify(): first arg (title) must be a string.');
}
function Queue(){
// initialise the queue and offset
this.queue = [];
this.offset = 0;
}
// Returns the length of the queue.
Queue.prototype.getLength = function(){
return (this.queue.length - offset);
}
//States
var states = [{
'name': 'working',
'initial': true,
'events': {
'bored': 'coffee',
'call_for_meeting': 'meeting',
}
}, {
'name': 'coffee',