Merry Christmas by nerds
Here we are!! Christmas holidays are coming and it’s time to collect nerd greetings for nerd friends! In this article I have collected some of my favorites: starting from css to the most unhealthy c code in the world, I hope you enjoy these repositories / snippets / gist / sketch! Best wishes for happy holidays!
CSS
While I was looking for some cool css stuff to share with you, I found this fantastic gist that show the kind of magic a web expert can do with a bunch of css lines. Riddle: what do you see if you use IE as a browser? The answer after the preview!
The code to reproduce this nice Santa Claus is available in this gist: it’s a really simple gist, with one html and one css file! Answer to the riddle: a Halloween pumpkin! 😂😂😂😂
Javascript
anvaka created the fantastic tree in the figure below using only 11 lines of javascript codes! Have a look at his repo
For the most curious, the lines used to build the spiral are the ones below:
return function(i) {
var zoff = i * Math.sin(i),
z = dz / (dz - sign * zoff * zScale),
x = getX(i, z, sign),
y = getY(i * yLocalScale, z);
if (zoff + sign * Math.PI / 4 < 0) {
switchColor(foreground);
} else {
switchColor(background);
}
ctx.moveTo(x, y);
ctx.lineTo(getX(i + 0.03, z, sign), getY((i + 0.01) * yLocalScale, z));
};
The DOM Trick
hakimel shared a tree created using DOM elements: you definetly have a look at the live demo, it’s amazing! The repo is available here.
Best whishes
soyuka thinks that instead of offering a gift to everyone, it’s fun to offer to some random member of your family (or friends). Have a look to its repo
ASCII Art in cli
In a contest organised by polish nerd forum during Christmas in 2016, repo wrote an application that creates Christmas card based on ASCII Art!
Original repo here
Sublime Text Christmas Theme
If you want to customize your Sublime Text editor (vintage version, but ehy, you know), you can follow zntfdr instructions ⛄:
- Locate your Sublime Text Packages folder by using the menu item Preferences -> Browse Packages…
- Download (Right click, save as) and put the .tmTheme file into a new folder named Christmas - Color Theme
- Move the new folder into Sublime Text’s Packages directory
- Activate the Christmas theme in Preferences -> Color Scheme…
- Enjoy! 🎁
The repo is available here
Thank you everybody for reading!