Last active
January 13, 2021 04:33
-
-
Save WebReflection/4589993 to your computer and use it in GitHub Desktop.
a silly script to write in your github timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* so here the thing ... you go in your github page | |
* as example I go here: https://github.com/WebReflection | |
* you open your console | |
* you copy and paste this shit | |
* then you write and execute in the console | |
* write("Hi There!"); | |
* NOTE: Pixel Font from a 2006 project of mine :-) http://devpro.it/pixelfont/ | |
*/ | |
function write(text, color, start) { | |
for (var | |
AGFont = { | |
"0": "40123478bcfgjknopqr", | |
"32": "4", | |
"33": "1012346", | |
"34": "3023568", | |
"35": "568abcdegiklmnoqs", | |
"36": "5123579acghimoprtvwx", | |
"37": "514579bdhlnprtux", | |
"38": "5157bfhjknopsvwy", | |
"39": "1012", | |
"40": "312369cfjk", | |
"41": "30158behij", | |
"42": "33579b", | |
"43": "57cfghijmr", | |
"44": "29bc", | |
"45": "5fghij", | |
"46": "16", | |
"47": "59dhlp", | |
"48": "512359adefhjkloptvwx", | |
"49": "31347adgijk", | |
"50": "512359eimquvwxy", | |
"51": "512359ehioptvwx", | |
"52": "5378bdfiklmnoswxy", | |
"53": "5012345abcdjoptvwx", | |
"54": "512345abcdfjkoptvwx", | |
"55": "5012349dhlpu", | |
"56": "512359aeghikoptvwx", | |
"57": "512359aeghijotvwx", | |
"58": "124", | |
"59": "27bc", | |
"60": "3579dh", | |
"61": "3678cde", | |
"62": "337bdf", | |
"63": "512359eimw", | |
"64": "512359acdefhjkmnopvwxy", | |
"65": "512359aefjklmnoptuy", | |
"66": "5012359aefghikoptuvwx", | |
"67": "512359afkptvwx", | |
"68": "5012359aefjkoptuvwx", | |
"69": "512345afghikpvwxy", | |
"70": "512345afghikpu", | |
"71": "512345afhijkoptvwx", | |
"72": "50459aefghijkoptuy", | |
"73": "301247adgijk", | |
"74": "52348diknpsvw", | |
"75": "50459adfghknptuy", | |
"76": "505afkpuvwxy", | |
"77": "50134579acefjkoptuy", | |
"78": "504569acefijkoptuy", | |
"79": "512359aefjkoptvwx", | |
"80": "5012359aefjklmnpu", | |
"81": "512359aefjkmopsvwy", | |
"82": "5012359aefghikoptuy", | |
"83": "512359aghioptvwx", | |
"84": "5012347chmrw", | |
"85": "50459aefjkoptvwx", | |
"86": "50459aefjkoqsw", | |
"87": "50459aefjkmoprtvx", | |
"88": "50459bdhlnptuy", | |
"89": "50459bdhmrw", | |
"90": "5012349dhlpuvwxy", | |
"91": "3012369cfijk", | |
"92": "55bhnt", | |
"93": "301258behijk", | |
"94": "3135", | |
"95": "5uvwxy", | |
"96": "2025", | |
"97": "5bcdjlmnoptvwxy", | |
"98": "505abcdfjkoptuvwx", | |
"99": "49abcgkpqr", | |
"100": "549bcdefjkoptvwxy", | |
"101": "5bcdfjklmnopvwxy", | |
"102": "5236bfghilqv", | |
"103": "45678bcfhijnopq", | |
"104": "40489acfgjknor", | |
"105": "3167adgijk", | |
"106": "5789dinpsvw", | |
"107": "4478acdegjknor", | |
"108": "1123456", | |
"109": "5abdfhjkmoprtuwy", | |
"110": "489acfgjknor", | |
"111": "5bcdfjkoptvwx", | |
"112": "5abcdfjklmnpu", | |
"113": "5bcdefjlmnoty", | |
"114": "48abcdgko", | |
"115": "49abchinopq", | |
"116": "56abcglqw", | |
"117": "5aefjkoptvwx", | |
"118": "5aefjkoqsw", | |
"119": "5aefjkoprtvx", | |
"120": "5aegimqsuy", | |
"121": "48bcfhijnopq", | |
"122": "489abfhikopqr", | |
"123": "42359chlqr", | |
"124": "10123456", | |
"125": "4016afimop", | |
"126": "40257", | |
"161": "113456", | |
"162": "42568bcgjlmp", | |
"163": "5236bgklmnquvwxy", | |
"164": "559bcdfjkoqrsuy", | |
"165": "50468cfghijmrvwx", | |
"166": "1012456", | |
"167": "512345bcdfjlmntuvwx", | |
"168": "302", | |
"169": "512359acefgjkmoptvwx", | |
"170": "401279abcfhij", | |
"171": "5cegikmqswy", | |
"172": "4ghijnr", | |
"173": "5klmno", | |
"174": "512359abcefgijklmopqstvwx", | |
"175": "501234", | |
"176": "31357", | |
"177": "527abcdehmuvwxy", | |
"178": "401279acghij", | |
"179": "401279afghi", | |
"180": "212", | |
"181": "403478bcdefgkp", | |
"182": "5124579aceghjmortv", | |
"183": "26789", | |
"184": "3hij", | |
"185": "31347acde", | |
"186": "3135689bd", | |
"187": "5acgimoqsuw", | |
"188": "5059adhlopsty", | |
"189": "5059adhlnopswxy", | |
"190": "5069adhlopsty", | |
"191": "52cgkptvwx", | |
"192": "517bcdfjkopqrstuy", | |
"193": "537bcdfjkopqrstuy", | |
"194": "5123bcdfjkopqrstuy", | |
"195": "51379bcdfjkopqrstuy", | |
"196": "513bcdfjkopqrstuy", | |
"197": "512368bcdfjkopqrstuy", | |
"198": "523467acfhiklmpruwxy", | |
"199": "512359afkoqrsvw", | |
"200": "41689abcghkopqr", | |
"201": "42589abcghkopqr", | |
"202": "412389abcghkopqr", | |
"203": "41389abcghkopqr", | |
"204": "315678adgijk", | |
"205": "324678adgijk", | |
"206": "3135678adgijk", | |
"207": "302678adgijk", | |
"208": "512369befghjloqtvwx", | |
"209": "52468aefgjkmopstuy", | |
"210": "528bcdfjkoptvwx", | |
"211": "526bcdfjkoptvwx", | |
"212": "5268bcdfjkoptvwx", | |
"213": "52468bcdfjkoptvwx", | |
"214": "513bcdfjkoptvwx", | |
"215": "559bdhlnpt", | |
"216": "56789aefijkmopqtuvwx", | |
"217": "528aefjkoptvwx", | |
"218": "537aefjkoptvwx", | |
"219": "5123aefjkoptvwx", | |
"220": "513aefjkoptvwx", | |
"221": "537aegimrvwx", | |
"222": "40489acfghiko", | |
"223": "512359aefhikoptuwx", | |
"224": "528bcdjlmnoptvwxy", | |
"225": "537bcdjlmnoptvwxy", | |
"226": "5123bcdjlmnoptvwxy", | |
"227": "51379bcdjlmnoptvwxy", | |
"228": "513bcdjlmnoptvwxy", | |
"229": "512368bcdjlmnoptvwxy", | |
"230": "5abdhjlmnoprvwxy", | |
"231": "5bcdfkqrsvw", | |
"232": "528bcdfjklmnopvwxy", | |
"233": "526bcdfjklmnopvwxy", | |
"234": "5123bcdfjklmnopvwxy", | |
"235": "513bcdfjklmnopvwxy", | |
"236": "31567adgijk", | |
"237": "31367adgijk", | |
"238": "301267adgijk", | |
"239": "30267adgijk", | |
"240": "5268eghijkoptvwx", | |
"241": "4025789acfgjknor", | |
"242": "517bcdfjkoptvwx", | |
"243": "526bcdfjkoptvwx", | |
"244": "5123bcdfjkoptvwx", | |
"245": "51357bcdfjkoptvwx", | |
"246": "513bcdfjkoptvwx", | |
"247": "5cklmnow", | |
"248": "5bcdefijkmopqtuvwx", | |
"249": "517aefjkoptvwx", | |
"250": "537aefjkoptvwx", | |
"251": "5123aefjkoptvwx", | |
"252": "513aefjkoptvwx", | |
"253": "537aegimrw", | |
"254": "505678aefjkopqrsu", | |
"255": "513aegimrw", | |
"height": 7 | |
}, | |
grid = [].slice.call(document.querySelectorAll(".calendar-graph g g"), 0, 53).map(function (g) { | |
return [].map.call(g.querySelectorAll("rect"), function (rect) { rect.style.fill = "#eee"; return rect; }); | |
}), | |
p = start || 0, | |
c, tmp, k, r, | |
i = 0; i < text.length; i++ | |
) { | |
tmp = AGFont[text[i].charCodeAt(0)]; | |
c = ~~tmp.charAt(0); | |
tmp = tmp.slice(1); | |
for (k = 0; k < tmp.length; k++) { | |
r = parseInt(tmp.charAt(k), 36); | |
try { | |
// 53 X 7 Y | |
grid[p + (r % c)][~~(r / c)].style.fill = color || "#1e6823"; | |
} catch(noRect){} | |
} | |
p += c + 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome :)
FWIW, the darkest green color used by the contribution graph is
#1e6823
. E.g.write('lolque', '#1e6823');
.