Skip to content

Instantly share code, notes, and snippets.

View fearphage's full-sized avatar
⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
View GitHub Profile
@fearphage
fearphage / clap.sh
Created January 24, 2020 16:02
Command Line Audio Playlist
#!/bin/bash
# Requirements: dialog mpv
# Optional: youtube-dl wget hq
# Arguments: none
#
# Changelog:
# > + from function to standalone script
# + menu stack for saving previous menu command
# + choices stack for saving previous menu choice
@fearphage
fearphage / multiple_ssh_setting.md
Created December 30, 2019 04:07 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@fearphage
fearphage / h264-vivaldi-linux.md
Created May 23, 2018 04:38 — 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

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 June 18, 2017 18:35 — 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/)
div#json, div#jfContent{
margin: 0;
padding: 20px;
background: #191919;
color: #C4BD97;
position: fixed;
top:0;
bottom:0;
left:0;
right:0;
@fearphage
fearphage / tests.js
Created May 13, 2016 13:06 — forked from jhartikainen/tests.js
Example of stubbing a complex object
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 16:58 — forked from vasanthk/System Design.md
System Design Cheatsheet

#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?
@fearphage
fearphage / ajax-post.js
Last active October 28, 2015 19:33 — forked from segdeha/ajax-post.js
Smallest possible Ajax implementation of POST requests (187 characters)
function p(u,p,c){with(new XMLHttpRequest)open('POST',u),setRequestHeader('Content-type','application/x-www-form-urlencoded'),onreadystatechange=function(){3<readyState&&c(this)},send(p)}
@fearphage
fearphage / ffmpeg
Last active September 1, 2015 16:41 — forked from bnerd/ffmpeg
Encode RTMP input stream into multiple outputs with ffmpeg
ffmpeg -re -i rtmp://localhost/live/input_stream -acodec libfaac -ab 128k -vcodec libx264 -s 640x360 -b:v 500k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_500k -acodec libfaac -ab 128k -vcodec libx264 -s 480x272 -b:v 300k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_300k -acodec libfaac -ab 128k -c:v libx264 -s 320x200 -b:v 150k -preset:v fast -profile:v baseline -level 1.2 -r 25 -f flv rtmp://localhost/live/medium_150k -acodec libfaac -vn -ab 48k -f flv rtmp://localhost/live/audio_only
#!/usr/bin/env bash
# On OS X, use this script to generate an encrypted deployment key for Travis CI.
# Dependencies:
# gem install travis
# brew install coreutils
if [ $# -lt 1 ]; then
echo "usage: $0 <user>/<repo>"