Skip to content

Instantly share code, notes, and snippets.

View fitsum's full-sized avatar
💭
npx fitsum

ፍፁም fitsum

💭
npx fitsum
View GitHub Profile
@fitsum
fitsum / _grid-base.sass
Created January 20, 2012 20:52
Fluid Desktop & Mobile Grid
// This file requires Sass & Compass.
//
// - http://sass-lang.com
// - http://compass-style.org
// For box-sizing.
@import compass/css3
// `Clear floated elements.
//----------------------------------------------------------------------------------------------------
@fitsum
fitsum / git-vlog
Created November 18, 2013 16:48 — forked from asabaylus/git-vlog
# Git visual log displays commit tree view with who did what when and in which branch
git config --global alias.vlog 'log --graph --date-order --date=relative --pretty=format:"%C(cyan)%h: %Cblue - %an - %Cgreen %C(cyan)%ar:%Creset%n%s%n" --color'
@fitsum
fitsum / three.html
Created December 27, 2020 21:55 — forked from nasser/three.html
a three.js boilerplate scene in a single 30 line self-contained html file
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reset-css@5.0.1/reset.min.css">
<script type="module">
import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.124.0/build/three.module.js"
import { OrbitControls } from "https://cdn.jsdelivr.net/npm/three@0.124.0/examples/jsm/controls/OrbitControls.js"
var scene = new THREE.Scene()
var camera = new THREE.PerspectiveCamera(75)
camera.position.z = 4
@fitsum
fitsum / stream-pdf-from-nodejs.js
Created January 25, 2024 10:42 — forked from InsilicoSoft/stream-pdf-from-nodejs.js
Stream local pdf file from nodejs (restify) server to client
server.get('/downloadPdf/:fileData', function (req, res) {
// config
var fileData = Buffer.from(req.params.fileData, 'base64');
var menuData = JSON.parse(fileData.toString());
var userName = menuData.userName;
var menuName = slug(menuData.menuName);
var fileName = userName + "-" + menuName + PDF_EXT;
var filePath = PDF_PATH + fileName;
// process headers
@fitsum
fitsum / leaflet-darkmode.md
Created August 21, 2024 22:04 — forked from BrendonKoz/leaflet-darkmode.md
Automatic Dark Mode for Leaflet.js
// Leaflet JS - note the *className* attribute
// [...]

L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
    className: 'map-tiles'
}).addTo(map);

// [...]