Skip to content

Instantly share code, notes, and snippets.

💰
github sold us out to M$

Roy Revelt revelt

💰
github sold us out to M$
Block or report user

Report or block revelt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@revelt
revelt / button-overlapping.html
Created Aug 13, 2019 — forked from hteumeuleu/button-overlapping.html
Example of button overlapping for @irmavdk on #emailgeeks Slack
View button-overlapping.html
<!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>
@revelt
revelt / gist:24ca0837cb31bab598517f4a4ea038f5
Created May 26, 2019
https://htmlcompressor.com/compressor/ will break upon this code (Nunjucks in head CSS, unclosed style tag), but https://htmlcrush.com will minify all right
View gist:24ca0837cb31bab598517f4a4ea038f5
<html>
<style>
{% if something %}
.z {
display: block;
}
{% endif %}
<body>
<table width="100" border="0" cellpadding="0" cellspacing="0">
@revelt
revelt / cpu.js
Created Nov 26, 2018 — 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.
View cpu.js
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 / string-strip-html.html
Created May 10, 2018
string-strip-html tester web app on VUE.JS
View string-strip-html.html
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>strip HTML</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
View padding_within_tables_within_vml.html
<!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 / keybase.md
Created Apr 15, 2017
My public Keybase identification
View keybase.md

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:

View 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 / styles.less
Created Nov 26, 2016 — forked from brandondurham/styles.less
Using Operator Mono in Atom
View styles.less
/**
* 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 / Hugo — Replace dashes on taxonomy terms
Created Jun 19, 2016
When your Hugo taxonomy term consists of multiple words, it will be shown with dashes. Here's how to restore spaces.
View Hugo — Replace dashes on taxonomy terms
<a href="/categories/{{ $name | urlize }}">{{ replace $name "-" " " }}</a>
@revelt
revelt / Lithuanian stop words
Created May 16, 2016
Here are deduped, checked and sorted stop words for Lithuanian language. Use them in all search/indexing applications, for example Lunr.js
View Lithuanian stop words
a
abi
abidvi
abiejose
abiejų
abiejuose
abiem
abipus
abu
abudu
You can’t perform that action at this time.