Skip to content

Instantly share code, notes, and snippets.

View seanmodd's full-sized avatar
🏠
Working from home

Sean Modd seanmodd

🏠
Working from home
View GitHub Profile
@seanmodd
seanmodd / FavShellCommands.md
Last active September 29, 2023 01:10
FavShellCommands

Fav Commands:

  • Use l = 'ls -lah' to list all directory contents, show all file types, show their sizes in readable human format
  • Use fzf --query "keybindings" to list all files that have the word keybindings in it

Other important commands to look up:

  • Look up fuzzy search from terminal
  • Find out how to exclude certain folders from fzf
  • What is the difference between demonu and fzf?
  • https://github.com/junegunn/fzf
  • use scriptable to automate iphone actions
@vik-y
vik-y / settings.json
Created September 27, 2023 03:20
VScode configuration that helps you write python code better!
{
"editor.formatOnSave": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"python.sortImports.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
@code-boxx
code-boxx / 0-JS-AUTOCOMPLETE.MD
Last active October 20, 2023 05:14
Javascript Autocomplete

JAVASCRIPT AUTOCOMPLETE

https://code-boxx.com/simple-autocomplete-html-javascript/

NOTE

The autocomplete is case-insensitive by default. If you want case sensitive searches, edit autocompete.js - function filter() – Remove both toLowerCase().

LICENSE

Copyright by Code Boxx

Permission is hereby granted, free of charge, to any person obtaining a copy

@pedrodsrodrigues
pedrodsrodrigues / .aliases
Created May 15, 2023 15:11
Shell Aliases (~/.aliases)
# Zshbase alias
alias zshconfig="code ~/.zshrc"
alias zshreload="source ~/.zshrc"
alias aliasconfig="code ~/.aliases"
alias zrl="source ~/.zshrc; source ~/.aliases"
# Other aliases
alias please="sudo !!"
alias ggclean='git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d'

Functional Components

rsf - React Stateless Function

import React from 'react';

function BugsList(props) {
  return (
    <div>

 
@seanmodd
seanmodd / redux.md
Last active February 2, 2022 19:54

Redux Actions

rdac - Redux: Action Creator (Preferred approach)

export const actionCreator = (payload) => {
  return {
    type: 'ACTION_TYPE',
    payload
  }
};
@seanmodd
seanmodd / providerCompose.js
Created October 23, 2021 20:14 — forked from stolinski/providerCompose.js
ProviderComposer
function ProviderComposer({ contexts, children }) {
return contexts.reduceRight(
(kids, parent) =>
React.cloneElement(parent, {
children: kids,
}),
children
);
}
@seanmodd
seanmodd / ChangingColor.js
Last active August 24, 2021 03:01
Good for Changing Colors! INCLUDE WITH DarkModeSwitch.js
import {
useColorMode,
Text,
useColorModeValue,
Heading,
VStack,
} from '@chakra-ui/react';
const ChangingColor = () => {
const color = useColorModeValue('#ff0000', '#00ff37');
@seanmodd
seanmodd / theme.js
Last active August 23, 2021 18:43
My Chakra Theme
// import { theme as defaultTheme, extendTheme, Button } from '@chakra-ui/react';
// import { createBreakpoints } from '@chakra-ui/theme-tools';
// const breakpoints = createBreakpoints({
// sm: '425px',
// md: '768px',
// lg: '960px',
// xl: '1280px',
// '2xl': '1440px',
// });
@seanmodd
seanmodd / main.tour
Created August 7, 2021 19:59
summer2021-codetour
{
"$schema": "https://aka.ms/codetour-schema",
"title": "Legend",
"steps": [
{
"file": "pages/_app.js",
"description": "The loading indicator is here",
"line": 33,
"selection": {
"start": {