#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
| #ifdef GL_ES | |
| precision highp float; | |
| #endif | |
| uniform sampler2D from, to; | |
| uniform float progress; | |
| uniform vec2 resolution; | |
| const float strength=0.1; | |
| void main() { | |
| vec2 p = gl_FragCoord.xy / resolution.xy; |
#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
| /** | |
| * SVG Fixer | |
| * | |
| * Fixes references to inline SVG elements when the <base> tag is in use. | |
| * Firefox won't display SVG icons referenced with | |
| * `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page. | |
| * | |
| * More info: | |
| * - http://stackoverflow.com/a/18265336/796152 | |
| * - http://www.w3.org/TR/SVG/linking.html |
| // Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
| $ git ls-files | xargs wc -l |
| import basin | |
| import string | |
| from hashlib import sha1 | |
| ## Fixed-length compact ids for compound keys. Given one or more strings, this will | |
| ## concat with delim (default '|'), sha1 hash the result, convert to the given base | |
| ## (default 62), truncate to the given length (default 12) and left-pad with zeros. | |
| ## | |
| ## *** WARNING MATH AHEAD *** | |
| ## Here's a handy way to approximate the birthday number for a given bitspace and a |
| const I = x => x | |
| const K = x => y => x | |
| const A = f => x => f (x) | |
| const T = x => f => f (x) | |
| const W = f => x => f (x) (x) | |
| const C = f => y => x => f (x) (y) | |
| const B = f => g => x => f (g (x)) | |
| const S = f => g => x => f (x) (g (x)) | |
| const S_ = f => g => x => f (g (x)) (x) | |
| const S2 = f => g => h => x => f (g (x)) (h (x)) |
| import argparse | |
| import subprocess | |
| import sys | |
| def do(id, tracker): | |
| subprocess.call(["transmission-remote", "-t", id, "-td", tracker]) | |
| def get(): | |
| q = subprocess.check_output(["transmission-remote", "-l"]) | |
| w = q.split("\n")[1:] |
| IMAGE node:argon | |
| RUN mkdir -p /usr/app | |
| COPY . /usr/app | |
| WORKDIR /usr/app | |
| RUN npm install |
How to configure your Mac to use DNS over TLS in five easy steps:
Install Stubby with Homebrew (https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby):
brew install stubby
Edit the configuration file:
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| /** | |
| * When we receive a request, fetch it from our S3 bucket | |
| * | |
| * For example, a request for: | |
| * https://mydomain.com/images/castle01.jpg | |
| * will be fetched from: |