Skip to content

Instantly share code, notes, and snippets.

⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
Block or report user

Report or block fearphage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fearphage
fearphage / meh.sh
Created Jul 10, 2019
Does mapfile work on a mac?
View meh.sh
#!/usr/bin/env bash
mapfile -t meh < <(ps -ax)
echo "found ${#meh[@]} processes"
@fearphage
fearphage / expire-emails.js
Created Oct 2, 2018
Archives (removes from inbox) emails tagged with "expires" tag that are more than 10 days old
View expire-emails.js
// The name of the Gmail Label to expire
var GMAIL_LABEL = 'expires';
// Archive messages automatically after N days
var EXPIRE_AFTER = '10';
/*
* STOP EDITING BELOW HERE UNLESS
* YOU KNOW WHAT YOU'RE DOING
*
@fearphage
fearphage / output.md
Created Jun 15, 2018
Sends content before and after another stream
View output.md

Below you will find the contents of some-file.txt:

just a file

That's all folks!

@fearphage
fearphage / h264-vivaldi-linux.md
Created May 23, 2018 — forked from ruario/h264-vivaldi-linux.md
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
View h264-vivaldi-linux.md

How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library

Intro

The following is a quick guide to get this working on various Linux distros. As a side note, if you have Chrome installed alongside Vivaldi, Netflix should also work after making these changes. Alternatively, use my latest-widevine.sh to fetch and extract Chrome's copy of Widevine, so that it can be used by Vivaldi.

If you don't have working Flash video and need that in addition, please refer to these instructions.

Note: This guide is primarrily aimed at users of Vivaldi stable releases. If it does not solve your issues, read this in addition.

@fearphage
fearphage / userstyle_jsonview.css
Created Jun 18, 2017 — forked from lennybacon/userstyle_jsonview.css
Dark Theme for Firefox/Chrome add-ons JSON View (http://jsonview.com/) and JSON Formatter (https://github.com/callumlocke/json-formatter) by using the add-on Stylish (https://userstyles.org/)
View userstyle_jsonview.css
div#json, div#jfContent{
margin: 0;
padding: 20px;
background: #191919;
color: #C4BD97;
position: fixed;
top:0;
bottom:0;
left:0;
right:0;
View chromium-os-docker.md
@fearphage
fearphage / .gitconfig
Last active Nov 26, 2018
When you need to save the code before you save yourself, git fire.
View .gitconfig
[alias]
fire = !"f() { \
local current_branch=$(basename \"$(git symbolic-ref HEAD)\"); \
local new_branch=fire-${current_branch}-$(git config user.email)-$(date +%s) \
local message; \
if [ -z \"$1\" ]; then \
message=\"fire commit from $current_branch\"; \
else \
message=\"$*\"; \
fi; \
@fearphage
fearphage / tests.js
Created May 13, 2016 — forked from jhartikainen/tests.js
Example of stubbing a complex object
View tests.js
describe('something', function() {
beforeEach(function() {
this.getAttributeStub = sinon.stub(Xrm.Page, 'getAttribute');
});
afterEach(function() {
this.getAttributeStub.restore();
});
it('tests something', function() {
@fearphage
fearphage / System Design.md
Created May 3, 2016 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
View README.md

Dropbox has a long-standing bug with changing case of files and directories. This is a work around.

It renames the directoy name to name+1 and then to lowercase name.

Example

  1. CatPants is renamed to CatPants1
  2. CatPants1 is then renamed to catpants
You can’t perform that action at this time.