Skip to content

Instantly share code, notes, and snippets.

View armornick's full-sized avatar

Nick Arnoeyts armornick

  • Belgium
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@DrSensor
DrSensor / Advanced Markdown Tricks.md
Last active March 30, 2024 22:51
Advanced Markdown Tricks

Repository

What Will I Learn?

In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:

  • Hide-show content
  • Writing codeblocks inside codeblocks
  • Combining and using italic, bold, superscript, subscript, and/or strikethrough
  • Quoting long sentence (using nested blockquotes)
anonymous
anonymous / LGRMLP.markdown
Created December 27, 2015 14:02
LGRMLP
@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@austinhyde
austinhyde / js-observables-binding.md
Last active August 16, 2023 18:19
Vanilla JavaScript Data Binding

Observables

You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:

var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }

console.log(getN()); // 5

setN(10);

anonymous
anonymous / config.json
Created November 7, 2014 14:08
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
@dalelane
dalelane / nodejs_db_with_restapi.js
Created June 15, 2014 21:09
Node.js, Express, and SQLite to wrap a REST API around an SQL database
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('data/demodb02');
db.serialize(function() {
db.run("CREATE TABLE IF NOT EXISTS counts (key TEXT, value INTEGER)");
db.run("INSERT INTO counts (key, value) VALUES (?, ?)", "counter", 0);
});
@jayharris
jayharris / DoingBootstrapRight.html
Last active September 27, 2017 15:49
Semantic CSS with Bootstrap and LESS
<div class="DoingItRight">This is how it is done!</div>
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
@stevedonovan
stevedonovan / foo.c
Created May 25, 2012 10:07
A Lua script to embed Lua code in a C module.
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#ifdef WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
static const char * lua_code = \