Skip to content

Instantly share code, notes, and snippets.

View Frankie-B's full-sized avatar
💭
New Day New Code

Frankie Bukenya Frankie-B

💭
New Day New Code
  • The Netherlands
View GitHub Profile
@Frankie-B
Frankie-B / hyper.js
Created April 23, 2019 14:05 — forked from coco-napky/hyper.js
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@Frankie-B
Frankie-B / javascript-classes.md
Created March 7, 2022 10:22 — forked from zoxon/javascript-classes.md
Adding and Removing Classes, with simple cross-browser JavaScript

Adding and Removing Classes, with simple cross-browser JavaScript

The standard JavaScript way to select an element is using document.getElementById("Id"), which is what the following examples use - you can of course obtain elements in other ways, and in the right situation may simply use this instead - however, going into detail on this is beyond the scope of the answer.

To change all classes for an element:

To replace all existing classes with one or more new classes, set the className attribute:

document.getElementById("MyElement").className = "MyClass";
@perjo927
perjo927 / HoverSupported.css
Last active November 10, 2022 16:17
CSS: Support hover only on non-touch devices using media query
/*
* Compiled CSS:
*/
a {
color: green;
}
@media not all and (pointer: coarse) {
a:hover {
color: blue;
}
@coryhouse
coryhouse / package.json
Last active April 15, 2023 15:08
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@coryhouse
coryhouse / webpack.config.dev.js
Last active April 15, 2023 15:08
Development Webpack config for "Building a JavaScript Development Environment" on Pluralsight
import path from 'path';
export default {
debug: true,
devtool: 'inline-source-map',
noInfo: false,
entry: [
path.resolve(__dirname, 'src/index')
],
target: 'web',
@Frankie-B
Frankie-B / main.js
Created March 12, 2023 16:33 — forked from kdzwinel/main.js
List all undefined CSS classes
/*
This script attempts to identify all CSS classes mentioned in HTML but not defined in the stylesheets.
In order to use it, just run it in the DevTools console (or add it to DevTools Snippets and run it from there).
Note that this script requires browser to support `fetch` and some ES6 features (fat arrow, Promises, Array.from, Set). You can transpile it to ES5 here: https://babeljs.io/repl/ .
Known limitations:
- it won't be able to take into account some external stylesheets (if CORS isn't set up)
- it will produce false negatives for classes that are mentioned in the comments.
@Frankie-B
Frankie-B / .editorconfig
Created March 12, 2023 00:21 — forked from markbrouch/.editorconfig
Base editorconfig for new projects
# Base editorconfig for new projects
root = true
[*]
end_of_line = lf
indent_style = space
tab_width = 4
charset = utf-8
trim_trailing_whitespace = true
@Frankie-B
Frankie-B / obsidian.templater.quick-capture.js
Created February 23, 2023 14:24 — forked from GitMurf/obsidian.templater.quick-capture.js
Obsidian Quick Capture using templater. Activate from anywhere in your vault to record quick ideas, notes, time logging, etc. The Quick Capture file does NOT need to be open.
<%*
//v1.4: Adding option for including a header for each DNP day to fold
//'first' will add to top of file. 'last' will add to bottom of file
let firstOrLastLine = 'first';
//Name of the Quick Capture file. Do NOT include extension '.md'
let qcFileName = 'Quick Capture';
//Leave this blank if you want to use the default file path location (set to '/' to use root of vault)
@Frankie-B
Frankie-B / settings.json
Created March 11, 2023 18:14
My current vscode settings based on Kent C Dodds's
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.detectIndentation": true,
"editor.lightbulb.enabled": false,
"editor.fontFamily": "Operator Mono, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": false,
"editor.rulers": [80],
"editor.snippetSuggestions": "top",
"editor.wordBasedSuggestions": false,
@Frankie-B
Frankie-B / conventional-commits.md
Created November 14, 2022 10:12 — forked from Zekfad/conventional-commits.md
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries