Skip to content

Instantly share code, notes, and snippets.

View Zei33's full-sized avatar

Matthew Zei33

View GitHub Profile
@Zei33
Zei33 / app.js
Last active July 29, 2021 07:24
Build a mysql search query with unknown number parameters (Javascript)
var query = "hello world ";
// Split query string and filter out empty words.
var queryWords = query.split(' ').filter(x => x.length);
console.log(queryWords);
// ["hello", "world"]
// Create WHERE clause that matches all words in the search (works for a single word too).
const match = `(${queryWords.map((x) => "TableName.Column LIKE '%?%'").join(' AND ')})`;
console.log(match);
@Zei33
Zei33 / userChrome.css
Last active July 11, 2018 18:10
Firefox Quantum (Target v59.0.1) Super Slim User Interface
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* 1. Navigate to about:support in Firefox and click the button under the Profile Folder heading.
2. Enter the folder ending in .default (probably something like m61ofslb.default).
3. Create a folder named chrome if it doesn't exist already.
4. Drop this file into that folder and restart your Firefox browser.
Designed for Firefox Quantum on Mac OSX and may require modification to work on other operating systems. */
.tab-close-button
### Keybase proof
I hereby claim:
* I am Zei33 on github.
* I am zei33 (https://keybase.io/zei33) on keybase.
* I have a public key whose fingerprint is 9C88 22D3 5E50 88D1 236F D5D4 2416 E838 786F 96F9
To claim this, I am signing this object: