An example of how you can support dark mode using Tailwind CSS.
Design: https://dribbble.com/shots/14594771-Dashboard-UI
A Pen by Mert Cukuren on CodePen.
{"fa-adjust" "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABQCAYAAABPlrgBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAACARJREFUeJztnHtsFNcZxc+5u9jmoTogWnv9XptCY6hoVbW0TRUqpJBETaOoCCSUKm1pI0X8EUUkFSnYjBYb8kBIRWmFAlKiRKQgQlpRSkTVKqRUbXFU2obwKGB2edi7mFKTFgzG3p3TP8CEhx93dnd215V/f3lmvu+7Z4/Xd+beO9fAGGOMMcYYvsJcNRRzaktKXM4WArMFTQdQS6IMQimo8QIMxX5Blwl2A+oEGIXBESL1t/LI6dMElAutvpkigOec+ply8RiI+ZDmgCzKoF6CwnsidhfT7J4aaf9vNvXeStZNOf18zeRxRYHvS1hCcla26wMAhF5AO2m4qTwS3Zvtb1DWTDm/oiaUDASWA3wSxIRs1R0R4SDlrikPnNrBCNxslMzYlMSzZRPdCRN/QmIZgPFZ0JQewj8ILgu1nNybaamMTEk44Ufk8ucgajIVkjWkrTR8JhSJnk+3RFqmdDmNk1Lq3QBgSboN+4mgf0n4YVVLbFc6+Z5N6Wiqm2GM2QlgRjoN5hJJ6ypMzQpG/pD0kufJlE6nbj5cvk3yU97k5Q9Je4p6ixZ9et2xS7Y51qYkVoUXusBbBMelJy+f6IDbV/xg1Yv//LdNtJUpiaa6RS7NVhImI2mAKHwoqM0QH4mMATgvpC7TDWwG8Y1M6o/Q+EG3v2iejTEjmhJvrn9Y0K9JBtPWI70v8k0yuKsycvzCoO2sqt8D4MF027DSAbSBV+dVRhJXhosb9oMmmhpmunC3p2OIBBfUFjLwUuXq9iNe8/2AwBxp/JtysGi4B70hP2z38vrSq8bdSXCS18YlvR8Qny5viX3kNddvCCyIu+HngdjaoWIG7SMEsLdIGwk2eGzzKoCnKlpi88pbowVnyCewpbO5/r6hrg5q |
An example of how you can support dark mode using Tailwind CSS.
Design: https://dribbble.com/shots/14594771-Dashboard-UI
A Pen by Mert Cukuren on CodePen.
#=============================================================================== | |
# NAME : bash_script_usage_v2.template.sh | |
# VERSION : 2.1.0 | |
# CREATED : Dec 12 23:41:26 CST 2022 | |
# AUTHOR : Matt Daniel Brown <dev@mattbrown.email> | |
# WEB : gist.github.com/mattdanielbrown/f00f119358b57a20ca9db67718dfbaf3 | |
#------------------------------------------------------------------------------- | |
# USAGE : Copy the `usage()` function below and paste into your bash script | |
# ... and then, replace the details as is appropriate for your script. | |
#=============================================================================== |
// ==UserScript== | |
// @name Userscript Name | |
// @namespace http://example.com/ | |
// @description Userscript Description | |
// @match http://example.com/* (or @include * to include all pages) | |
// @version 1.0 | |
// ==/UserScript== | |
// Emulate Greasemonkey's unsafeWindow in Chrome | |
window.unsafeWindow = window.unsafeWindow || (function() { |
// Cloudflare Worker script to automatically redirect search queries based on trigger words | |
addEventListener("fetch", event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
// status code for redirect response; need something that won't cache | |
var statuscode = 303 | |
// defining base URLs for search engines |
# Run the last command as root | |
sudo !! | |
# Serve current directory tree at http://$HOSTNAME:8000/ | |
python -m SimpleHTTPServer | |
# Save a file you edited in vim without the needed permissions | |
:w !sudo tee % | |
# change to the previous working directory | |
cd - | |
# Runs previous command but replacing | |
^foo^bar |
This gist includes components of a oozie workflow - scripts/code, sample data | |
and commands; Oozie actions covered: java mapreduce action; Oozie controls | |
covered: start, kill, end; The java program uses regex to parse the logs, and | |
also extracts the path of the mapper input directory path and includes in the | |
key emitted. | |
Note: The reducer can be specified as a combiner as well. | |
Usecase | |
------- |
// From yesenadam at https://news.ycombinator.com/item?id=23590848 | |
function $(id) { return document.getElementById(id); } | |
function byClass (el, cl) { return el ? el.getElementsByClassName(cl) : [] } | |
function byTag (el, tg) { return el ? el.getElementsByTagName(tg) : [] } | |
function allof (cl) { return byClass(document, cl) } | |
function hasClass (el, cl) { var a = el.className.split(' '); return afind(cl, a) } | |
function addClass (el, cl) { if (el) { var a = el.className.split(' '); if (!afind(cl, a)) { a.unshift(cl); el.className = a.join(' ')}} } | |
function remClass (el, cl) { if (el) { var a = el.className.split(' '); arem(a, cl); el.className = a.join(' ') } } | |
function html (el) { return el ? el.innerHTML : null; } |
This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247
Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book
I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!
A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:
.