Skip to content

Instantly share code, notes, and snippets.

View jeffersonswartz's full-sized avatar
🕹️
Everything Under Control

Jefferson Swartz jeffersonswartz

🕹️
Everything Under Control
View GitHub Profile
@thebinarypenguin
thebinarypenguin / simple-jquery-infinite-scroll.html
Created September 26, 2011 20:32
Simple jQuery Infinite Scroll
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple jQuery Infinite Scroll</title>
</head>
<body>
<h1>One</h1>
<br />
@dylancwood
dylancwood / tree.css
Last active June 20, 2024 01:54
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;
@GuillaumeJasmin
GuillaumeJasmin / extract.js
Last active September 26, 2022 04:10
Extract substring between two strings
String.prototype.extract = function(prefix, suffix) {
s = this;
var i = s.indexOf(prefix);
if (i >= 0) {
s = s.substring(i + prefix.length);
}
else {
return '';
}
if (suffix) {
@nsdevaraj
nsdevaraj / timeseries.js
Created June 10, 2019 06:23
arima pending
function assertNotEmpty(list) {
if (list.length === 0)
throw new Error("List length is zero");
}
function simple_exponential_smoothing(series, alpha) {
assertNotEmpty(series);
var prev = 0.0;
var ses_series = [];