Skip to content

Instantly share code, notes, and snippets.

View stekhn's full-sized avatar

Steffen Kühne stekhn

View GitHub Profile
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active May 2, 2025 09:35
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
@tonyhschu
tonyhschu / .block
Last active February 16, 2024 22:44
Small Scroll-linked Animation Demo
scrolling: yes
license: MIT
'use strict';
const fs = require('fs');
const del = require('del');
const rollup = require('rollup');
const babel = require('rollup-plugin-babel');
const uglify = require('rollup-plugin-uglify');
const pkg = require('../package.json');
const bundles = [
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active January 27, 2025 19:57
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@veltman
veltman / README.md
Last active September 22, 2024 09:20
Gif rendering - SVG to GIF

Testing in-browser gif generation from an SVG with gif.js. Works in recent Chrome/Safari/Firefox.

Process:

  1. Create a standard SVG line chart.
  2. Step through in-between frames of the line chart: for each one, update the SVG, render to an image, add the image element to a stack of gif frames.
  3. Render frames together in the background using gif.js web workers.
  4. When rendering's complete, add the blob URL as an image and start the SVG on an infinite loop with d3.timer (gratuitous).

See also: Gif Globe, Gif New Jersey

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 18, 2025 06:21
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@aral
aral / gist:273110ea2965219dce97
Last active August 30, 2016 17:49
A quick hack with a div overlay to stop Mapbox iframe map from breaking the scroll of the page
/*
<iframe id='map' width='100%' height='500px' frameBorder='0' src='https://a.tiles.mapbox.com/v3/laurakalbag.ie85aj18/attribution,zoompan,geocoder,share.html'></iframe>
<!-- This overlay is used to prevent Mapbox from breaking the scroll of the page on touch-enabled devices. -->
<div id="overlay" class="overlay" style="position: relative; width: 100%; height: 511px; margin-top:-511px;">
<img src="" width: 100% height: 500px>
</div>
*/
//
@ericcoopey
ericcoopey / README.md
Last active April 28, 2017 16:10
Animating Changes in Force Diagram

Demonstrates how to dynamically add and remove nodes to a force diagram. This was functionality that should seemingly be easy, but was surprisingly hard. Many people were asking how to do this in forums, and this final product is the amalgamation of several commenters half baked (but not really functioning) solutions.

This one demonstrates changes in a social network diagram as relationships are added, removed, and updated. Add nodes by name, add links complete with custom lengths.

Also shows how to add labels to a force diagram.

@bingomanatee
bingomanatee / smoothSeries_nor.js
Created February 18, 2014 18:23
A function that takes in a set of numbers -- or an array of numbers -- and smooths values that seem like outliers, based on standard deviation. Not included is the underscorej.s library available at http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js. The actual libarary begins at line 1200; the first lines are a statisti…
(function (window) {
var ss = function () {
// # simple-statistics
//
// A simple, literate statistics system. The code below uses the
// [Javascript module pattern](http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth),
// eventually assigning `simple-statistics` to `ss` in browsers or the
// `exports object for node.js