Skip to content

Instantly share code, notes, and snippets.

View sacsand's full-sized avatar
🏠
Working from home

Sachintha Sandaruvan sacsand

🏠
Working from home
View GitHub Profile
@sacsand
sacsand / index.html
Created December 2, 2018 19:56
VueJS transition & transition-group demo
<main id="app" class="content">
<nav class="nav">
<menu class="nav__controls">
<icon class="nav__icon" use="#filter"></icon>
<li v-for="(active, menu) in menus" class="nav__label"
:class="{
'nav__label--active' : active,
'nav__label--filter': activeFilters[menu].length
}" @click="setMenu(menu, active)">
@sacsand
sacsand / multiFilter.js
Created October 20, 2018 19:48 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple criteria.
/**
* Filters an array of objects with multiple criteria.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria as the property names
* @return {Array}
*/
function multiFilter(array, filters) {
const filterKeys = Object.keys(filters);
// filters all elements passing the criteria

Did you know you can install fonts without elevation?

The catch is that they're only available for the duration of your session. They are, however, available in all apps across the system.

Someone asked about how to do it on Facebook this week, and at first, I just pointed them at the install script for PowerLineFonts which loops through all the fonts in a folder and install them.

I've used this more than a few times to install some fonts, including the PowerLine ones, which are great:

$sa = New-Object -ComObject Shell.Application
@sacsand
sacsand / Windows font management.md
Created August 30, 2018 07:32 — forked from rsms/Windows font management.md
Notes on font management on Windows
@sacsand
sacsand / html5-video-streamer.js
Created September 9, 2017 12:59 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';