Skip to content

Instantly share code, notes, and snippets.

View timsully's full-sized avatar
🧠

Tim Sullivan timsully

🧠
View GitHub Profile
let arrayOfStr = ['javascriptman', 'stringy', 'stringer', 'another', 'this',];
for (let i = 0; i < arrayOfStr.length; i++) {
console.log(`whole string: ${arrayOfStr[i]}`);
for (let k = 0; k < arrayOfStr[i].length; k++) {
console.log(`individual character: ${arrayOfStr[i][k]}`);
}
}
@timsully
timsully / ARCHITECTURE md reference
Created February 8, 2021 18:42
Gist to reference for how to create an architecture file
# Architecture
This document describes the high-level architecture of rust-analyzer.
If you want to familiarize yourself with the code base, you are just in the right place!
See also the [guide](./guide.md), which walks through a particular snapshot of rust-analyzer code base.
Yet another resource is this playlist with videos about various parts of the analyzer:
https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE
// light mode elevation
// Use for Accordion, Cards, Chip, Slider, Segment
@emboss: 0px 0px 1px rgba(0, 0, 0, 0.06), 0px 1px 6px rgba(0, 0, 0, 0.07);
// Use for Dropdown, Message, Snackbar, Tooltip
@overlay: 0px 1px 7px rgba(0, 0, 0, 0.03), 0px 2px 23px rgba(0, 0, 0, 0.05), 0px 9px 107px rgba(0, 0, 0, 0.08);
// Dropshadow for dialogs
@dialog: 0px 1.5px 10px rgba(0, 0, 0, 0.03), 0px 5px 28px rgba(0, 0, 0, 0.05), 0px 10px 66px rgba(0, 0, 0, 0.06), 0px 36px 219px rgba(0, 0, 0, 0.09);
@timsully
timsully / disable.sh
Created August 1, 2020 04:19
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents

What to tackle:

  • 1. Implement Reach Router to go to a drilldown page to each icon when you select the card

  • 2. Build out Icons Page for when you drilldown into a page from clicking on a card on the homepage

  • 3. Build out Packages left sidebar with React example

  • 4. Build out the packages drilldown page

Clone Project > npm install --save

@timsully
timsully / Update-branch.md
Created June 4, 2020 22:17 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@timsully
timsully / clear-font-cache.md
Created April 9, 2020 20:41 — forked from jaredhowland/clear-font-cache.md
Clear Mac OS X Font Caches
.button-primary {
background-color: $liteColor;
&:focus {
background-color: $liteColor;
}
&:hover {
background-color: $liteColorHover;
}
&:active {
background-color: $liteColorActive;
@timsully
timsully / props-styled-components.jsx
Created December 5, 2019 06:54
Everything is in one place — logic, styling, and markup. Styled components.
// You can pass a function to your style declarations with one parameter which is component's
// props. You can then use props to adjust your styling.
import React from 'react'
import ReactDOM from 'react-dom'
import styled from 'styled-components'
const StyledButton = styled.button`
border-radius: 5px;
background-color: ${props => (props.secondary ? '#F7A072' : '#a1cdf1')};
color: #fff;