Skip to content

Instantly share code, notes, and snippets.

View thevangelist's full-sized avatar
⛩️

thevangelist

⛩️
  • Taitopilvi
  • 0.98327 - 1.017 AU
View GitHub Profile
@thevangelist
thevangelist / border-bottom linear gradient in CSS
Last active February 28, 2023 09:51
Gradient bottom border to div in CSS
/** CSS **/
.border-bottom {
border-bottom: 1px solid transparent;
border-image: linear-gradient(0.25turn, transparent, black, transparent);
border-image-slice: 1;
width: 100%;
}
/** HTML **/
@thevangelist
thevangelist / .gitconfig
Last active January 11, 2023 11:38
Git Diff alias excluding package-lock.json
[alias]
giff = "!git diff --stat $1 -- ':(exclude)*package-lock.json'"
@thevangelist
thevangelist / debug.js
Created December 27, 2021 11:19
Console.log only in dev mode (debug)
const debug =
process.env.NODE_ENV !== "production"
? console.log.bind(console)
: () => void 8;
export default debug;
@thevangelist
thevangelist / alphabets.md
Created December 9, 2018 15:49
alphabets paste sheet for typography / calligraphy

abcdefghijklmnopqrstuvwxyzåäö

ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ

1234567890

@thevangelist
thevangelist / kalat.md
Last active March 9, 2024 15:29
Saadut kalat


2018.04.01 Saraavesi: 1 x 15 cm ahven DIY-sini-puna-valko-lusikka + mustakultainen morri
2018.04.02 Saraavesi: 0 kalaa, vaikka kokeiltu ympäriinsä
2018.04.20 Jyväsjärvi, Päijänne: Äijälänsalmi jigailtu läpi isolla kirkkaalla jigillä, vain kiviä. Ei myöskään Rauhalahdessa.
2018.04.30 Saraavesi: 0 kalaa, avokelalla Sararannan laitureilta heittelyä: kaislikko-Räsänen ja kulta-musta Bete Lotto.
2018.05.05 Päijänne: 0 kalaa, Umpikela + Avokela, rantoja ja syvänteitä, uistelua, jigailua ja heittelyä. Luonnollinen jigi, iso vaappu, Bete Lotto ahvenvärityksellä, Helmi-Räsänen (kaislikko). Puolipilvisestä aurinkoiseen keskipäivä 13-16.
2018.05.xx Palokkajärvi: 0 kalaa, heitelty kepillä kaloja
2018.05.xx Palokkajärvi: 0 kalaa, heittokoholla heitelty
@thevangelist
thevangelist / only-reducer-youll-ever-need.js
Last active March 2, 2018 11:42
The Only Reducer You'll Ever Need
// Change anything with this reducer ;)!
const onlyReducerYoullEverNeed = (state={}, action) => {
return {
...state,
action.payload
}
};
@thevangelist
thevangelist / git-diff-exclude-stats.md
Last active January 12, 2018 11:31
Git diff --stat with exclude files

// Just the exclude diff lines changed git diff --stat master -- ':(exclude)*package-lock.json'

// Detailed output on changed lines count

git log --author="<[email protected]>" --pretty=tformat: --numstat -- ':(exclude)*package-lock.json' | awk '{inserted+=$1; deleted+=$2; delta+=$1-$2; ratio=deleted/inserted} END {printf "Commit stats:\n- Lines added (total)....  %s\n- Lines deleted (total)..  %s\n- Total lines (delta)....  %s\n- Add./Del. ratio (1:n)..  1 : %s\n", inserted, deleted, delta, ratio }' -

// Output example

@thevangelist
thevangelist / ttl-debug.md
Last active November 2, 2017 13:11
DNS record TTL test

dig thevangelist.github.io |awk '$2 ~ "[0-9]+"' |col

// More details: watch -d dig thevangelist.github.io

@thevangelist
thevangelist / styled-components.jsx
Last active December 2, 2017 12:22
Styled Components (styled-components)
import React, { Component } from 'react';
import styled, { ThemeProvider } from 'styled-components';
import { modularScale } from 'polished';
const BASE = '#DBECF3';
const BRAND = '#062E40';
const BRAND_ALT = '#34A5B6';
const ATTENTION = '#F94253';
const UNIT = 1;