Skip to content

Instantly share code, notes, and snippets.

View KDCinfo's full-sized avatar
💭
Flutter Developer | Contra Costa Co. CA

Keith D Commiskey KDCinfo

💭
Flutter Developer | Contra Costa Co. CA
View GitHub Profile
@FilledStacks
FilledStacks / stacked_snippets.json
Last active January 2, 2024 04:09
Flutter / Stacked snippets for productivity
{
"Freezed model": {
"prefix": "frz",
"body": [
"@freezed",
"class ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g}} with _$${1} {",
" factory ${1}({",
" required ${2:String id},",
" }) = _${1};",
"}"
@myogeshchavan97
myogeshchavan97 / trap_focus.js
Last active November 26, 2022 08:46
Code for trapping focus inside modal
// add all the elements inside modal which you want to make focusable
const focusableElements =
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
const modal = document.querySelector('#exampleModal'); // select the modal by it's id
const firstFocusableElement = modal.querySelectorAll(focusableElements)[0]; // get first element to be focused inside modal
const focusableContent = modal.querySelectorAll(focusableElements);
const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside modal
@mpj
mpj / example01.js
Created August 14, 2017 07:38
Code for the async/await episode of Fun Fun Function.
const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`)
const data = await response.json()
return data.imageUrl
}
function moveModuleIntoBoard(module, board) {
return new Promise((resolve, reject) => {
const mutation = `
{
moveModuleToBoard(input: {
clientMutationId: "${new Date().getTime()}",
boardId: "${board.id}",
moduleId: "${module.id}"
}) {
viewer {
@toburger
toburger / dabblet.css
Created April 4, 2013 09:27 — forked from anonymous/dabblet.css
Simple CSS only flyout menu
/**
* Simple CSS only flyout menu
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font-family: Arial;
}
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@bzerangue
bzerangue / html2md-with-pandoc.sh
Created April 26, 2012 23:14
RECURSIVELY Bash convert all your html to markdown files (with Pandoc)
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done
@benatkin
benatkin / Global.sublime-settings
Created July 20, 2011 04:26
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}