Skip to content

Instantly share code, notes, and snippets.

View the-code-innovator's full-sized avatar
🎯
Focusing

Aravind Muthukrishnan the-code-innovator

🎯
Focusing
View GitHub Profile
@the-code-innovator
the-code-innovator / github-graph-colours-changer.js
Created March 21, 2018 06:26 — forked from noeldelgado/github-graph-colours-changer.js
Copy and paste the code on your github profile page to change the graph colours... (DevTools » Console)
var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823'];
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7'];
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0];
var days = [].slice.call(graph.getElementsByTagName('rect'), 0);
days.forEach(function(rect) {
switch(rect.getAttribute('fill').toUpperCase()) {
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow
case GH[1]: rect.setAttribute('fill', CO[Math.floor(Math.random() * 2)]); break; // red || orange
@the-code-innovator
the-code-innovator / test2038.c
Last active March 21, 2018 10:57 — forked from MihailJP/test2038.c
time_t implementation check after Y2038 Epoch.
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
time_t time_num[5] = {(time_t)0x00000000, (time_t)0x7fffffff, (time_t)0x80000000, (time_t)0xffffffff,};
struct tm* parsed_time; unsigned int i;
printf("sizeof(time_t) is %lu.\n", sizeof(time_t));
for (i = 0; i < 4; i++) {
parsed_time = gmtime(&(time_num[i]));