Skip to content

Instantly share code, notes, and snippets.

View how-to-view-source-of-chrome-extension.md

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

View manjaro default bashrc
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
View Splitting a subfolder out into a new repository.md

Source

Splitting a subfolder out into a new repository

You can turn a folder within a Git repository into a brand new repository.

If you create a new clone of the repository, you won't lose any of your Git history or changes when you split a folder into a separate repository.

@peter-avila
peter-avila / Subfolder to git repo.md
Created Mar 11, 2019 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
View Subfolder to git repo.md
View bash prompt
######################################
# PA added
#
# 3-line prompt with git integration
#
# ┌────[user@host ]-( 0 jobs ) - -- - - - - - [ 2019-11-11 | 11:11:11 ]
# ⚡ /present/working/Directory ] -( master )
# └──▶
#
@peter-avila
peter-avila / .hyper.js
Last active Mar 14, 2019
Hyper Sync Settings
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@peter-avila
peter-avila / markdown-details-collapsible.md
Created Mar 10, 2019 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.
View markdown-details-collapsible.md

A collapsible section with markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@peter-avila
peter-avila / bender-bash-prompt
Created Mar 10, 2019 — forked from specious/bender-bash-prompt
A fancy two-line #!/bin/bash prompt with $(git integration)
View bender-bash-prompt
#
# Fancy two-line prompt with git integration
#
# ┌───=[ specious :: sharp -( 0 )-[ ~ ]-( master )
# └──(
#
parse_git_dirty () {
[[ $(git status 2> /dev/null | tail -1) != "nothing to commit, working tree clean" ]] && echo "*"
}
@peter-avila
peter-avila / twoline_prompt.sh
Created Mar 10, 2019 — forked from mkottman/twoline_prompt.sh
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
View twoline_prompt.sh
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"