Skip to content

Instantly share code, notes, and snippets.

View Draphar's full-sized avatar
🍪
Correlation does not imply causation.

Draphar

🍪
Correlation does not imply causation.
View GitHub Profile
@Draphar
Draphar / exitcode.c
Last active May 6, 2019 14:36
C program to set an exit code, for testing purposes
#include<stdlib.h>
int main(int argc, char* argv[]){
if(argv[1] == NULL) {
return 0;
} else {
return atoi(argv[1]);
}
}
@Draphar
Draphar / extern.js
Last active July 17, 2018 21:09
Easy method to pass server side variables to inline or extern JavaScript
var text = document.currentScript.getAttribute('data-variable'); // text is now 'Lorem ipsum dolor sit amet'