Skip to content

Instantly share code, notes, and snippets.

@Alexs7zzh
Alexs7zzh / .eleventy.js
Created April 24, 2021 04:44
eleventy-img in markdown
const Image = require('@11ty/eleventy-img')
const { parseHTML } = require('linkedom')
module.exports = eleventyConfig => {
if (process.env.ELEVENTY_ENV)
eleventyConfig.addTransform('transform', (content, outputPath) => {
if (outputPath && outputPath.endsWith('.html')) {
let { document } = parseHTML(content)
@koyanloshe
koyanloshe / server.js
Last active April 17, 2020 08:28
Basic server for most filetypes #Javascript
var http = require('http');
var fs = require('fs');
var path = require('path');
http.createServer(function (request, response) {
console.log('request ', request.url);
var filePath = '.' + request.url;
if (filePath == './') {
filePath = './index.html';
@eyecatchup
eyecatchup / apple-meta-insanity.html
Created February 8, 2015 12:28
Insanity of Apple-specific meta tags..
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Apple Meta Insanity</title>
<!--
APPLE WEB APP META TAGS
-->
@mbijon
mbijon / fft.php
Last active February 13, 2025 15:13
Fast Fourier Transform in PHP
<?php
// !!! Warning: for reference, not debugged
###################################################################
# PHP_Fourier 0.03b
# Original Fortran source by Numerical Recipies
# PHP port by Mathew Binkley ([email protected])
###################################################################