Skip to content

Instantly share code, notes, and snippets.

Avatar

David Toews davejtoews

View GitHub Profile
@davejtoews
davejtoews / .czrc
Created Mar 14, 2022
Custom Commitizen config
View .czrc
{
"path": "cz-emoji",
"config": {
"cz-emoji": {
"symbol": true,
"types": [
{
"emoji": "🎨",
"code": ":art:",
"description": "Improving structure / format of the code.",
@davejtoews
davejtoews / jsObject.code-snippets
Last active Mar 9, 2021
JavaScript object code snippet
View jsObject.code-snippets
{
"DataObject": {
"scope": "javascript",
"prefix": "exportableObject",
"body": [
"const ${1:Name} = {",
" $2",
"};",
"",
"export default ${1:Name};",
View davetoews.zsh-theme
THEME_GREEN=$FG[113]
THEME_ORANGE=$FG[173]
THEME_BLUE=$FG[080]
THEME_RED=$FG[167]
THEME_PURPLE=$FG[134]
THEME_YELLOW=$FG[179]
PROMPT_SUCCESS_COLOR=$THEME_GREEN
PROMPT_FAILURE_COLOR=$THEME_ORANGE
PROMPT_PROMPT=$THEME_BLUE
View SilverStripe.code-snippets
{
"DataObject": {
"scope": "html",
"prefix": "SSDataObject",
"body": [
"<?php",
"",
"namespace ${1:Namespace};",
"",
"use SilverStripe\\ORM\\DataObject;",
@davejtoews
davejtoews / findOverflowingElements.js
Created Aug 15, 2019
Detect elements which are overflowing your window and causing a side scroll.
View findOverflowingElements.js
[].forEach.call(document.querySelectorAll('*'), function(element) {
if (element.offsetLeft + element.offsetWidth > window.innerWidth) {
console.log(element);
}
});