Skip to content

Instantly share code, notes, and snippets.

View revelt's full-sized avatar
🤗
hello

Roy Revelt revelt

🤗
hello
View GitHub Profile
@revelt
revelt / Lithuanian stop words
Created May 16, 2016 22:53
Here are deduped, checked and sorted stop words for Lithuanian language. Use them in all search/indexing applications, for example Lunr.js
a
abi
abidvi
abiejose
abiejų
abiejuose
abiem
abipus
abu
abudu
@revelt
revelt / Hugo — Replace dashes on taxonomy terms
Created June 19, 2016 06:04
When your Hugo taxonomy term consists of multiple words, it will be shown with dashes. Here's how to restore spaces.
<a href="/categories/{{ $name | urlize }}">{{ replace $name "-" " " }}</a>
@revelt
revelt / styles.less
Created November 26, 2016 18:28 — forked from brandondurham/styles.less
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@revelt
revelt / classless.md
Created January 30, 2017 11:54 — forked from mpj/classless.md

The future is here: Classless object-oriented programming in JavaScript.

Douglas Crockford, author of JavaScript: The Good parts, recently gave a talk called The Better Parts, where he demonstrates how he creates objects in JavaScript nowadays. He doesn't call his approach anything, but I will refer to it as Crockford Classless.

Crockford Classless is completely free of class, new, this, prototype and even Crockfords own invention Object.create.

I think it's really, really sleek, and this is what it looks like:

function dog(spec) {
@revelt
revelt / keybase.md
Created April 15, 2017 09:52
My public Keybase identification

Keybase proof

I hereby claim:

  • I am revelt on github.
  • I am revelt (https://keybase.io/revelt) on keybase.
  • I have a public key ASAH0_RTw862CWkRjbModkDfOvXEMABtCJZ3vPhDph9G3Qo

To claim this, I am signing this object:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>vml test</title>
</head>
<body>
<center>
<table width="120" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
@revelt
revelt / string-strip-html.html
Created May 10, 2018 22:23
string-strip-html tester web app on VUE.JS
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>strip HTML</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
@revelt
revelt / cpu.js
Created November 26, 2018 05:57 — forked from bag-man/cpu.js
How to calculate the current CPU load with Node.js; without using any external modules or OS specific calls.
var os = require("os");
//Create function to get CPU information
function cpuAverage() {
//Initialise sum of idle and time of cores and fetch CPU info
var totalIdle = 0, totalTick = 0;
var cpus = os.cpus();
//Loop through CPU cores
@revelt
revelt / gist:24ca0837cb31bab598517f4a4ea038f5
Created May 26, 2019 09:00
https://htmlcompressor.com/compressor/ will break upon this code (Nunjucks in head CSS, unclosed style tag), but https://htmlcrush.com will minify all right
<html>
<style>
{% if something %}
.z {
display: block;
}
{% endif %}
<body>
<table width="100" border="0" cellpadding="0" cellspacing="0">
@revelt
revelt / button-overlapping.html
Created August 13, 2019 09:43 — forked from hteumeuleu/button-overlapping.html
Example of button overlapping for @irmavdk on #emailgeeks Slack
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>button overlapping</title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:600px; background:#e5f3f6;">
<tr>
<td>