33 次代碼提交 f3b5e45d4f ... e1dfd97b56

作者 SHA1 備註 提交日期
  René Maya e1dfd97b56 Add spclient to start or join an emacsclient session 5 年之前
  René Maya 2199d3e421 Add firefox chrome template 5 年之前
  René Maya 090010b48e Add color themes 5 年之前
  René Maya 66fd002a5e Update log and tmp related formulas 5 年之前
  René Maya f8a7671b47 Add config note for git online help 5 年之前
  René Maya 69fcb62f96 Improve usage message 5 年之前
  René Maya 41ee94f1ad Fix pls to show children only 5 年之前
  René Maya 6ec6fbc6e9 Set nano tabs to spaces 5 年之前
  René Maya a6951ec5d9 Change repl exit banner 5 年之前
  René Maya 5ae821eebf Add repl exit banner 5 年之前
  René Maya 79b239326c Extract banner helper methods 5 年之前
  René Maya 241c4067eb Init repos on main branch 5 年之前
  René Maya e3eb0e56f3 Add vidminify function 5 年之前
  René Maya df4b3035ef Add download function 5 年之前
  René Maya f830344e05 Add bye art to end of irb session 5 年之前
  René Maya be2e179bdc Add macOS specific aliases 5 年之前
  René Maya 15abbde415 Add pst for pasting code 5 年之前
  René Maya d40762caa2 Point doc links to current 5 年之前
  René Maya 619cc80170 Add sqliterc 5 年之前
  René Maya 48c6fb18b4 Update apps download link list 5 年之前
  René Maya ff352ffdcc Add snippet for gem bug report 5 年之前
  René Maya 73e23307f0 Move profile sample 5 年之前
  René Maya 194990ba15 Update updates section 5 年之前
  René Maya 055fa54844 Add casks 5 年之前
  René Maya 7b8bdbfde3 Add sendemail sample details for patches 5 年之前
  René Maya c0beef51b7 Quiet stash aliases 5 年之前
  René Maya 2dba0f8be3 Update brew settings 6 年之前
  René Maya 6560635035 Add uncommit alias 6 年之前
  René Maya 3de9fa36f9 Update fci rule column 6 年之前
  René Maya d00eb33471 Update system gems scripts 6 年之前
  René Maya 8493d00eec Init ES global modules install script 6 年之前
  René Maya b886d9704c Add format section for patches and new aliases 6 年之前
  René Maya 103d552517 Add toc-mix snippet for markdown 6 年之前

File diff suppressed because it is too large
+ 10 - 7
.spacemacs.d/init.el


+ 1 - 0
.spacemacs.d/snippets/markdown-mode/imagex

@@ -2,4 +2,5 @@
 # name: Imagex
 # key: imagex
 # --
+
 ![${1:alt}](${0:hyperlink}?raw=true){:target="_blank"}{:rel="nofollow noopener noreferrer"}

+ 13 - 0
.spacemacs.d/snippets/markdown-mode/toc-mix

@@ -0,0 +1,13 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: Toc mix
+# key: toc-mix
+# --
+
+<details markdown="1" id="table-of-contents">
+  <summary>
+    Table of Contents
+  </summary>
+
+  * TOC
+  {:toc}
+</details>

+ 18 - 0
.spacemacs.d/snippets/ruby-mode/bug

@@ -0,0 +1,18 @@
+# -*- mode: snippet; require-final-newline: nil -*-
+# name: Bug
+# key: bug
+# --
+
+# -*- coding: utf-8 -*-
+# -*- frozen_string_literal: true -*-
+
+require "bundler/inline"
+
+gemfile do
+  source "https://rubygems.org"
+  gem "${1:to_report}"
+  gem "${2:dependency}"
+end
+
+# A self contained script reproducing the bug
+$0

+ 12 - 0
es/global_modules.sh

@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -e
+
+# node version manager
+# https://github.com/tj/n
+yarn global add n
+
+# latest, stable node release
+n stable
+
+# testing framework
+yarn global add ava tern jsonlint prettier remark speed-test

+ 11 - 31
firefox/ReadMe.org

@@ -110,7 +110,6 @@ Alternatively, go to ~about:config~ and check that ~_user.js.log~ is set to
 Password storage has been disabled for security reasons. Make sure to install a
 password manager that doesn't rely on the browser.
 
-
 *** DNS over HTTPS
 
 We can enable DoH starting w/Firefox 62. So it's been enabled in this ~user.js~
@@ -131,7 +130,6 @@ We can add two [[https://stats.searx.xyz/][Searx instances]] to ensure we can al
 Alternatively, you can use close-source solutions such as [[https://duckduckgo.com/][DuckDuckGo]], and [[https://www.startpage.com/][Startpage]].
 Also, check out the official [[https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox][add or remove a search engine in firefox]] post.
 
-
 *** Add-ons
 
 Tracking is too profitable to be easy to turn off. These add-ons help a lot:
@@ -175,7 +173,6 @@ Alternative viewers
 - [[https://addons.mozilla.org/en-US/firefox/addon/qiureader/][QiuReader]] - ePub reader
 - [[https://addons.mozilla.org/en-US/firefox/addon/epubreader/][EPUBReader]] - alternative ePub reader
 
-
 *** Downloads
 
 For privacy reasons, downloads aren't allowed on Desktop. To set your default
@@ -183,7 +180,6 @@ For privacy reasons, downloads aren't allowed on Desktop. To set your default
 
   General > Downloads > Save files to
 
-
 *** Camera / Mic
 
 Both, camera and mic, have been blocked for privacy reason. To add site
@@ -197,12 +193,13 @@ To manage site exceptions:
 
 *** Fonts
 
-Web fonts can easily be abused on many ways, either directly or by requiring
-unsafe configuration settings.
+Web fonts can easily be abused on many ways, either directly or by
+requiring unsafe configuration settings.
 
-Best course of action, privacy wise, is to use whatever fonts Firefox includes.
-Next, to set the ~font.name.*~ family of attributes to something suitable to your
-system. If none of that is suitable check out these:
+Best course of action, privacy wise, is to use whatever fonts Firefox
+includes. Next, to set the ~font.name.*~ family of attributes to
+something suitable to your system. If none of that is suitable check out
+these:
 
 - [[https://pagure.io/liberation-fonts][Liberation fonts]]
 - [[https://www.typewolf.com/google-fonts][40 best google open-source fonts]]
@@ -212,7 +209,6 @@ On macOS we might want to remove these fonts to reduce fingerprinting.
 In ~Font Book~ remove ~Wingdings 2~, ~Wingdings 3~, ~Arial Unicode MS~,
 ~Brush Script MT~, ~Georgia~, and ~Helvetica~.
 
-
 *** Notifications
 
 Notifying is complex, requires features that may be abused. If you want to enable
@@ -231,7 +227,6 @@ To manage site exceptions:
 
   Options > Privacy & Security > Permissions > Notifications > Settings
 
-
 *** Temporary configuration
 
 As mentioned above, we can temporarily reset any option on the ~about:config~
@@ -239,27 +234,10 @@ page. For instance, to toggle ~media.autoplay.enabled~ which may break some medi
 players. Also, to temporarily toggle on ~network.captive-portal-service.enabled~
 to allow WiFi hotspot login pages. Overrides last until we restart the browser.
 
+*** Updates
 
-** Firefox updates
-
-The ~user.js~, as is, has browser and add-on automatic updates turn on. On BSD/Linux
-we may need to toggle ~app.update.auto~ in ~KEEP UP~.
-
-Firefox comes bundle with a few extensions which no ~user.js~ can fully control,
-such as:
-
-- Activity-stream
-- Pocket
-- Follow on search
-
-If we want to disable them completely, every time Firefox is updated:
-
-In macOS,
-
-#+BEGIN_SRC shell
-cd /Applications/FirefoxDeveloperEdition.app/Contents/Resources/browser/features
-rm activity-stream@mozilla.org.xpi firefox@getpocket.com.xpi followonsearch@mozilla.com.xpi
-#+END_SRC
+The ~user.js~, as is, has browser and add-on automatic updates turn on.
+On BSD/Linux we may need to toggle ~app.update.auto~ under ~KEEP UP~.
 
 ** References
 
@@ -281,3 +259,5 @@ rm activity-stream@mozilla.org.xpi firefox@getpocket.com.xpi followonsearch@mozi
 - [[https://web.archive.org/web/20180612075637/http://forums.mozillazine.org/viewtopic.php?p=14100263&sid=ccbb32d20108696ba1325be9ec741f4c][How to remove OpenH264 Video Codec]]
 - [[https://web.archive.org/web/20180612075352/http://forums.mozillazine.org/viewtopic.php?f=38&t=2888681][How do I remove the OpenH264 Video Codec plugin??]]
 - [[https://daniel.haxx.se/blog/2018/06/03/inside-firefoxs-doh-engine/][Inside Firefox’s DOH engine]]
+- [[https://ffeathers.wordpress.com/2013/03/10/how-to-override-css-stylesheets-in-firefox/][How to override css stylesheets in Firefox]]
+- [[https://www.hongkiat.com/blog/customize-reader-view-theme-firefox/][Customize reader view theme]]

+ 41 - 0
firefox/profile/chrome/userContent.css

@@ -0,0 +1,41 @@
+@charset "UTF-8";
+
+/* Use Firefox developer tools to check which CSS selectors to use */
+
+/*
+  Beware :root[hasbrowserhandlers="true"] body affects other browser
+  pages such as about:blank.
+
+  Use !important to prevent extensions from overriding preferences.
+*/
+
+@-moz-document url-prefix("about:blank") {
+  #container {
+    /* ... */
+  }
+}
+
+@-moz-document domain("https://somewhere.example") {
+  /* ... */
+}
+
+/* When dark background is selected */
+:root[hasbrowserhandlers="true"] body.dark  {
+  /* ... */
+}
+/* When light background is selected */
+:root[hasbrowserhandlers="true"] body.light  {
+  /* ... */
+}
+/* When sepia background is selected */
+:root[hasbrowserhandlers="true"] body.sepia  {
+  /* ... */
+}
+/* When serif font is selected */
+:root[hasbrowserhandlers="true"] body.serif {
+  /* ... */
+}
+/* When sans-serif font is selected */
+:root[hasbrowserhandlers="true"] body.sans-serif {
+  /* ... */
+}

+ 7 - 1
firefox/user.js

@@ -118,6 +118,7 @@ user_pref("browser.newtabpage.introShown", true);
 user_pref("browser.newtabpage.activity-stream.enabled", false);
 user_pref("browser.newtabpage.activity-stream.impressionId", "");
 user_pref("browser.newtabpage.activity-stream.asrouterExperimentEnabled", false);
+user_pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", "");
 user_pref("browser.newtabpage.activity-stream.default.sites", "");
 user_pref("browser.newtabpage.activity-stream.disableSnippets", true);
 user_pref("browser.newtabpage.activity-stream.asrouterfeed", false);
@@ -132,6 +133,7 @@ user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
 user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
 user_pref("browser.newtabpage.activity-stream.feeds.section.topstories.options", "data:text/plain,");
 user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
+user_pref("browser.newtabpage.activity-stream.showSponsored", false);
 user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
 user_pref("browser.newtabpage.activity-stream.feeds.systemtick", false);
 user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
@@ -224,6 +226,8 @@ user_pref("extensions.autoDisableScopes", 15);
 user_pref("extensions.blocklist.enabled", true);
 user_pref("extensions.blocklist.url", "https://blocklists.settings.services.mozilla.com/v1/blocklist/3/%APP_ID%/%APP_VERSION%/");
 user_pref("xpinstall.whitelist.required", true);
+user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
+user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
 user_pref("browser.safebrowsing.blockedURIs.enabled", true);
 user_pref("browser.safebrowsing.phishing.enabled", true);
 user_pref("browser.safebrowsing.malware.enabled", true);
@@ -271,7 +275,8 @@ user_pref("network.http.altsvc.enabled", false);
 user_pref("network.http.altsvc.oe", false);
 user_pref("network.proxy.socks_remote_dns", true); // #=> when available
 user_pref("network.proxy.autoconfig_url.include_path", false);
-user_pref("network.trr.mode", 2);
+user_pref("network.trr.mode", 3);
+user_pref("network.security.esni.enabled", true); //only if trr.mode >= 2
 user_pref("security.csp.enable", true);
 user_pref("security.csp.enable_violation_events", false);
 user_pref("security.csp.experimentalEnabled", true);
@@ -565,6 +570,7 @@ user_pref("extensions.webcompat-reporter.enabled", false);
 user_pref("image.animation_mode", "once"); // GIF animation repetitions
 user_pref("lightweightThemes.usedThemes", "[]");
 user_pref("lightweightThemes.getMoreURL", "");
+user_pref("browser.discovery.enabled", false); // disable extension recommendations
 
 
 // RETIRED

+ 52 - 18
git/.gitconfig

@@ -6,6 +6,8 @@
   diff-staged = diff --word-diff --ignore-all-space --staged
   delete = branch --delete
   unstage = reset
+	uncommit = reset --soft HEAD^
+	discard = checkout --
 	add-patch = add --patch
 	discard-patch = checkout --patch
 	unstage-patch = reset --patch
@@ -13,17 +15,14 @@
 	amend = commit --amend --reuse-message=HEAD
 
 # James Brown school of git
-  down = pull
-  onup = push
-
-# Stash untracked resources
-  stash-all = stash save --include-untracked
+	down = pull
+	onup = push
 
 # Create branch and take to it
-  take = checkout -b
+	take = checkout -b
 
-# Undo changes back to commit hash or HEAD~# (changes lost for good!)
-  undo-for-good = reset --hard
+# Undo last N commits (HEAD~N); Go back to commit hash as HEAD
+	undo-for-good = reset --hard
 
 # Remove directory without deleting it
 	untrack-dir = rm --cached -r
@@ -32,18 +31,41 @@
 	untrack-file = rm --cached
 
 # Show untracked & ignored resources
-  untracked = clean -dX --dry-run
+	untracked = clean -dX --dry-run
 
 # Delete local branches deleted on remote
-  prune = fetch --prune
+	prune = fetch --prune
+
+# Track remote branch
+	track-branch = checkout --track
 
 # Sneak changes into last commit
-  sneak = commit --amend --no-edit
+	sneak = commit --amend --no-edit
+
+# Check local ref is up-to-date w/upstream before overwriting it. Only if we MUST
+	please = push --force-with-lease
+
+# Stash unstaged changes to tracked files only
+	aside = stash push --quiet --keep-index
+
+# Draw latest stash back
+	draw = stash pop --quiet
 
+# Stash untracked and tracked files
+	amass = stash push --quiet --include-untracked
+
+# Stash ignored, untracked, and tracked files
+	hoard = stash push --quiet --all
 
 ## Prefixed bang (!) turns values into shell commands
 
-# Show help online
+# List aliases
+	alias = "! git config --get-regexp alias | sed -e 's/alias.//' -e 's/ / = /' | sort"
+
+# Init empty repo for rebase best practice
+	it = "!git init && git commit -m “root” --allow-empty"
+
+# Show help online; configured in [browser] section below
 	help-web = "! git help $1 --web"
 
 # Show local branch commits not in origin
@@ -87,17 +109,20 @@
 
 # Create a new browser command and configure help -w to use it. eg. git help log -w
 [browser "gitscm"]
-	cmd = "/bin/sh -c 'open https://git-scm.com/docs/$(basename $1 .html)' --"
+  cmd = "/bin/sh -c 'open https://git-scm.com/docs/$(basename $1 .html)' --"
 
 [core]
-	excludesfile = ~/.gitignore_global
+  excludesfile = ~/.gitignore_global
 	editor = emacs
 
 # Safer `git rebase` on macOS: http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/
-	trustctime = false
+  trustctime = false
+
+[init]
+	templateDir = ~/.git_templates
 
 [color]
-	ui = always
+  ui = always
 [color "diff"]
   meta = yellow
   frag = magenta # line span info
@@ -122,13 +147,14 @@
 
 [help]
   autocorrect = 1 # auto-correct and execute command typos
-	browser = gitscm
+  browser = gitscm
 
 [pull]
   rebase = true
 
 [push]
   default = current # Push current branch to same branch on the receiving end
+	followTags = true # Include reachable tags
 
 [fetch]
   prune = true # Remove remote-tracking references no longer in remote
@@ -136,6 +162,14 @@
 [hub]
   protocol = ssh
 
+[format]
+  signOff = true
+  numbered = auto
+  signature = "Cheers"
+  outputDirectory = "./patch"
+  coverLetter = true
+  # signatureFile = ~/.gitsignature
+
 [merge]
 	tool = emacs
 	conflictstyle = diff3
@@ -145,7 +179,7 @@
   prompt = false
   keepBackup = false
 [mergetool "emacs"]
-	cmd = emacs --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
+	cmd = "emacs --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot"
 	trustExitCode = true
 
 [include]

+ 0 - 0
git/.gitignore_global


Some files were not shown because too many files changed in this diff