Skip to content

Instantly share code, notes, and snippets.

Avatar
🍋
Hanging around.

Robert Lemon rlemon

🍋
Hanging around.
View GitHub Profile
@vineeth-pappu
vineeth-pappu / index.html
Created Jan 26, 2021
Pure CSS Cyberpunk 2077 Buttons 😎
View index.html
<button class="cybr-btn">
Cyber<span aria-hidden>_</span>
<span aria-hidden class="cybr-btn__glitch">Cyber_</span>
<span aria-hidden class="cybr-btn__tag">R25</span>
</button>
<button class="cybr-btn">
Buttons<span aria-hidden>_</span>
<span aria-hidden class="cybr-btn__glitch">Buttons_</span>
<span aria-hidden class="cybr-btn__tag">R25</span>
</button>
View coding-styles.md

These examples are presented in an attempt to show how each coding styles attempts to or does not attempt to isolate side-effects. There are only 2 semantic elements in a barebone "Hello World" implementation:

  • Invocation of console.log
  • Declaration of HELLO_WORLD

Since every coding style can abstract away data into a parameter or variable, there is no point for us to show that. All implementations assume HELLO_WORLD is a constant that is always inlined. This way it reduces the variations we need to present. (To make an anology, if we were to implement incrementByOne, would we need to inline the number 1 or pass it in as parameter?)

CAVEAT/LIMITATION: All implementations also assume console is static global. In case of functional programming, console.log is asumed to be a function that can be passed around without further modification. (This is not the case in the browser, but that can be resolved with console.log.bind(console))

Declarative

@rupey
rupey / mandelbrot.sql
Last active Dec 7, 2020
Mandelbrot plot in postgres
View mandelbrot.sql
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,
@staltz
staltz / introrx.md
Last active Sep 22, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
View darkchat.css
body {
background-color : #000 !important;
background-image : url("http://raw.github.com/oliversalzburg/se-chat-dark-theme/master/img/skewed_print.png") !important;
color : #ddd !important;
}
.messages {
background-color : #222 !important;
border : none !important;
color : #ddd !important;
View gist:7713141

So you have a javascript function.

function func () {}

It accepts a value.

function func (param) {}
@Zirak
Zirak / 1.cinderella.md
Last active Dec 23, 2015
Beauty and the knife.
View 1.cinderella.md
1. Cinderella.

drip, drip, drip

What is that sound? Did someone leave the tap on? Is there a leak somewhere?

drip, drip, drip

Maybe it's raining. It hasn't rained in a long time. She remembers one rainy day in particular, from before she planted her wishing tree under which she weeps. She remembers the smell of sweat, clinging cloth to skin, streaming down a forehead. The all-too-red blush on cheeks. Wheezing and coughing and puffing, creaking planks and a leaky roof (her father will fix it, surely).

@ralt
ralt / gist:5543578
Last active Dec 17, 2015
List of list of books
View gist:5543578
List of list of books so that we can do book exchanges.
Florian Margaine: https://gist.github.com/Ralt/5543525
@mainerror
mainerror / README.md
Last active Dec 16, 2015
A minimal 960 grid CSS *framework*.
View README.md

mini960.css

a minimal 960 grid framework

There's not much you need to know. It supports nesting and offsetting.

The idea is, you start with a row and add columns with a certain span to that row.

Here's a simple example.