Define text editor
$ sudo update-alternatives --config editor
Edit /etc/sudoers
file
$ sudo visudo /etc/sudoers
javascript: q = location.href; | |
q = q.replace(/[?&]utm_[^&]*/g, ""); | |
q = q.replace(/[?&]mc_[^&]*/g, ""); | |
q = q.replace(/[?&]src=[^&]*/g, ""); | |
q = q.replace(/[?&]ref=[^&]*/g, ""); | |
desc = ""; | |
if (document.getElementsByName("description").length > 0) { | |
desc = document.getElementsByName("description")[0].getAttribute("content") | |
"\n\n" | |
} else if (document.getElementsByName("Description").length > 0) { |
Define text editor
$ sudo update-alternatives --config editor
Edit /etc/sudoers
file
$ sudo visudo /etc/sudoers
// ==UserScript== | |
// @name Google Meet helper | |
// @namespace Violentmonkey Scripts | |
// @match https://meet.google.com/* | |
// @grant none | |
// @version 1.3.04 | |
// @author Vanshaj Girotra, Will Sheppard | |
// @description auto camera off, auto-mute, and auto join -- in that order. Also switches account (defaults to primary) | |
// @run-at document-idle | |
// ==/UserScript== |
use strict; | |
use warnings; | |
use Data::Dumper::Concise; | |
use Search::Elasticsearch; | |
my $ekk = Search::Elasticsearch->new( | |
client => '7_0::Direct', | |
nodes => [ 'https://opensearch.example.com/', ], | |
send_get_body_as => 'POST', |
// ==UserScript== | |
// @name AtlassianRedirect | |
// @namespace atlassian.com | |
// @version 0.09 | |
// @grant none | |
// @run-at document-end | |
// @match *://*.atlassian.com/* | |
// @match *://*.atlassian.net/* | |
// @author Ludo Tolhurst-Cleaver, Will Sheppard, Dan Banks | |
// ==/UserScript== |
// ==UserScript== | |
// @name Stay signed in to MS | |
// @description Automatically click "yes" on the Microsoft "stay signed in" page that keeps appearing. | |
// @downloadURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js | |
// @updateURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js | |
// @namespace https://gist.github.com/emlyn/ | |
// @version 0.2 | |
// @author Emlyn Corrin | |
// @match https://login.microsoftonline.com/login.srf | |
// @icon https://c.s-microsoft.com/favicon.ico?v2 |
Command line example:
$ sqlite3 -line -cmd 'select * from zip limit 1' database.sqdb < `which echo` ".exit"> output
export HAR_FILE="/path/to/har/file"
knex.select() | |
.from('some_table') | |
.where({ | |
name: 'Mr Foo' | |
}) | |
.then((result) => { | |
// This block is *REQUIRED* or the query is not sent to the database! | |
if (! result[0]) { | |
console.log(`Error: "Mr Foo" was not found.`); | |
process.exit(1); // It is alright to exit here *IF* it's a fatal condition |