Skip to content

Instantly share code, notes, and snippets.

View zeropaper's full-sized avatar
💅
I may be slow to respond.

Valentin Vago zeropaper

💅
I may be slow to respond.
View GitHub Profile

Script URL substrings used to detect the embeddings from the companies offering session replay services

  • mc.yandex.ru/metrika/watch.js
  • mc.yandex.ru/metrika/tag.js
  • mc.yandex.ru/webvisor/
  • fullstory.com/s/fs.js
  • d2oh4tlt9mrke9.cloudfront.net/Record/js/sessioncam.recorder.js
  • ws.sessioncam.com/Record/record.asmx
  • userreplay.net
  • script.hotjar.com
signals:
colorA:
type: hsla
defaultValue: '180,50%,50%,1'
input: null
hue: 180
saturation: 50
lightness: 50
alpha: 100
beatA:
@iampeterbanjo
iampeterbanjo / package.json
Last active January 4, 2017 06:24
NPM package for working with gohugo.io
{
"name": "hello.hugo",
"version": "1.0.0",
"description": "Test gohugo.io project",
"main": "browserSync.js",
"dependencies": {},
"devDependencies": {},
"config": {
"port": "4646",
"theme": "hyde"
@nikku
nikku / screencapture.md
Last active May 21, 2020 23:12
Animated Gif utility for X11 based systems

works badge

This is a simple script that allows you to choose an area that will be recorded into a 10s animated gif.

Usage

screencapture [dest-file]
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@wbzyl
wbzyl / README.md
Created July 17, 2012 20:42
Glow Filter

SVG Essentials – Filters

This is a recreation (for the purpose of tinkering with an implementation in d3.js) of the example from the book SVG Essentials by J. David Eisenberg.

The <feColorMatrix> element allows to change color values in a following way.

@akgupta
akgupta / localStorageSync.js
Created March 12, 2012 04:20
Overriding backbone sync to use local storage
// overriding sync to use local storage when possible
sync : function(method, model, options){
var key, now, timestamp, refresh;
if(method === 'read' && this.constants.isStoredInLocalStorage) {
// only override sync if it is a fetch('read') request
key = this.getKey();
if(key) {
now = new Date().getTime();
timestamp = $storage.get(key + ":timestamp");
refresh = options.forceRefresh;
@zeropaper
zeropaper / YOURMODULENAME.module.php
Created September 27, 2011 11:10
A simple theming function override to display the generated .info file for the features module
<?php
/**
* Implements hook_theme_registry_alter()
*/
function YOURMODULENAME_theme_registry_alter(&$items) {
$items['features_components']['function'] = 'YOURMODULENAME_features_components';
}
@zeropaper
zeropaper / CSS3-Smilies.html
Created December 14, 2010 14:07
CSS3-Smilies
<style type="text/css">
.smiley {
background-color: rgb(0, 0, 0);
color: rgb(255, 255, 255);
display: inline-block;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 12px;
text-align: center;
@pgriess
pgriess / sendfile.js
Created September 16, 2010 20:53
Using sendfile(2) with NodeJS
var assert = require('assert');
var net = require('net');
var open = process.binding('fs').open;
var sendfile = process.binding('fs').sendfile;
if (process.argv.length < 4) {
console.error('usage: sendfile <port> <path>');
process.exit(1);
}