Skip to content

Instantly share code, notes, and snippets.

View floydpink's full-sized avatar

Hari Pachuveetil floydpink

View GitHub Profile
@BuonOmo
BuonOmo / time_ago.sh
Last active July 7, 2023 12:42
Time ago in words within bash
#!/usr/bin/env bash
# Copyright (c) 2019 Ulysse Buonomo <[email protected]> (MIT license)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@mikepfeiffer
mikepfeiffer / stress.sh
Created January 27, 2019 21:05
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
@aallan
aallan / mac-vendor.txt
Last active October 25, 2024 18:15
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@hfitzwater
hfitzwater / app.html
Last active December 17, 2018 20:06 — forked from jdanyow/app.html
Aurelia Validation Demo
<!--
__ __ _ _ _ _ _ _____ _
\ \ / / | (_) | | | | (_) / ____| |
\ \ / /_ _| |_ __| | __ _| |_ _ ___ _ __ | | | |__ __ _ _ __ __ _ ___ ___
\ \/ / _` | | |/ _` |/ _` | __| |/ _ \| '_ \ | | | '_ \ / _` | '_ \ / _` |/ _ \/ __|
\ / (_| | | | (_| | (_| | |_| | (_) | | | | | |____| | | | (_| | | | | (_| | __/\__ \
\/ \__,_|_|_|\__,_|\__,_|\__|_|\___/|_| |_| \_____|_| |_|\__,_|_| |_|\__, |\___||___/
__/ |
|___/
@hfitzwater
hfitzwater / app.html
Last active January 31, 2017 15:46 — forked from jdanyow/app.html
Nested drag and drop
<template>
<require from="tree-renderer"></require>
<h1>
Nested drag and drop
</h1>
<tree-renderer
node.bind="tree"
node-view-path="data-item-view.html"
@mickdekkers
mickdekkers / snazzy.xml
Last active March 22, 2019 11:03
Sindre Sorhus' Snazzy theme ported to ConEmu -- see https://github.com/joonro/ConEmu-Color-Themes#how-to-install for installation instructions
<key name="Palette1" modified="2016-11-18 17:52:55" build="160710">
<value name="Name" type="string" data="Snazzy"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="00362a28"/>
<value name="TextColorIdx" type="hex" data="00ebf0ef"/>
<value name="BackColorIdx" type="hex" data="00362a28"/>
<value name="PopTextColorIdx" type="hex" data="00ebf0ef"/>
<value name="PopBackColorIdx" type="hex" data="00362a28"/>
<value name="ColorTable00" type="dword" data="00362a28"/>
<value name="ColorTable01" type="dword" data="00ffc757"/>
@freshcutdevelopment
freshcutdevelopment / web.xml
Last active May 8, 2022 14:05
Web.config for single page application push state in IIS (credit to Matt McCabe)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<remove name="pushState" />
<rule name="pushState" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
@JamesWP
JamesWP / Get the first commit url.js
Last active November 21, 2016 03:58
A snippet using the github public api to get the url and sha of the first commit for a given repo
// A snippet using the github public api to get
// the url and sha of the first commit for a given repo
function openFirstCommit(userorg, repo) {
return fetch('https://api.github.com/repos/'+userorg+'/'+repo+'/commits')
.then(obj=>obj.headers.get('link'))
// the link header has additional urls for paging
.then(link=>link.split(',')[1].split(';')[0].slice(2,-1))
// the link contains two urls in the form
@zeroasterisk
zeroasterisk / buildPhantomJSAsLinux-inDocker.sh
Created September 21, 2016 19:04
Build a node lambda function for
#!/bin/bash
# If you are developing on OSX on Windows
# but you want to run on linux - or in docker - or on AWS Lambda
# PhantomJS must be the binary for that OS...
# https://github.com/sindresorhus/pageres/issues/275
#
# Easiest solution, download inside a docker, running on linux
#
# This script should be run from within the docker container
#
@Rich-Harris
Rich-Harris / service-workers.md
Last active November 5, 2024 06:39
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.