This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux 3.0a | |
# remap prefix from C-b to C-a | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# set pane using mouse | |
set -g mouse on | |
# make tmux use your preferred shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const log = string => console.log(`\x1b[33m${string}\x1b[0m`); | |
log('\nRunning lock-version.js\nThe purpose of this script is to lock the npm versions of all packages to the current installed version to avoid breaking changes caused by accidental package updates.\n'); | |
prompt('This will lock all package versions to the current version installed.\nThis will remove ^ and ~ from the version number\nProceed? y/n: ', proceed => { | |
proceed = proceed.toLowerCase(); | |
switch (proceed) { | |
case 'y': | |
readFile(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create .tmux.conf in your home directroy | |
# This will hold tmux configurations | |
cd ~ | |
nano .tmux.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open Issues Count | |
https://img.shields.io/github/issues/<username>/<repo>.svg?style=for-the-badge | |
Close Issues Count | |
https://img.shields.io/github/issues-closed/<username>/<repo>.svg?style=for-the-badge | |
NPM Downloads | |
https://img.shields.io/npm/dm/<username>/<pkg_name>.svg?style=for-the-badge | |
Repo Size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; Previous song | |
+F1:: | |
Send {Media_Prev} | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Just a tip for ppl debugging such issues in 1.2 - | |
// This is a short snippet I wrote that will print an error to the console with the contents of the guilty (minified) function. | |
// All you need to do is put a breakpoint before angular bootstraps, paste the snippet in the console and release the debugger. | |
Object.defineProperty(Function.prototype, '$inject', { | |
configurable: true, | |
get: function() { | |
return this.$injectHooked; | |
}, | |
set: function (arr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function b64toBlob(dataURI) { | |
// convert base64 to raw binary data held in a string | |
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this | |
var byteString = atob(dataURI.split(',')[1]); | |
// separate out the mime component | |
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; | |
// write the bytes of the string to an ArrayBuffer | |
var ab = new ArrayBuffer(byteString.length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/a/56361977/4110257 | |
function name() { | |
var agent = window.navigator.userAgent.toLowerCase(); | |
switch (true) { | |
case agent.indexOf("edge") > -1: return "edge"; | |
case agent.indexOf("edg") > -1: return "chromium based edge (dev or canary)"; | |
case agent.indexOf("opr") > -1 && !!window.opr: return "opera"; | |
case agent.indexOf("chrome") > -1 && !!window.chrome: return "chrome"; | |
case agent.indexOf("trident") > -1: return "ie"; |