Skip to content

Instantly share code, notes, and snippets.

View sgriffey's full-sized avatar
🏄‍♂️

Stuart sgriffey

🏄‍♂️
View GitHub Profile

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@rsms
rsms / figma-project-stats.js
Created June 21, 2018 19:17
Script that generates statistics for a Figma project, like number of files, frames, versions etc
//
// Figma project stats
// Pulls statistics like number of files, frames, versions etc for a project.
//
// Usage:
// export FIGMA_API_ACCESS_TOKEN='your-token'
// node figma-project-stats.js <project-id>
//
// You can generate tokens in your account settings or at
// https://www.figma.com/developers/explorer#personal-access-token
@rik
rik / simulateTyping.js
Created September 1, 2017 14:30
Fake typing animation with async/await
async function nextFrame() {
return new Promise((resolve) => {
requestAnimationFrame(resolve)
})
}
async function randomDelay(min, max) {
const delay = Math.random() * (max - min) + min;
const startTime = performance.now()
while (performance.now() - startTime < delay) {

Dan answers questions

I get these questions (or similarly-phrased questions) often enough that I figured it would be helpful to post my responses somewhere. So, uh, here you go.


Q: What changes did you see in the design process at Dropbox from when you started to when you left and how did that impact you as a designer?

A: When I first joined Dropbox, I was the latest in a team of about a dozen designers in a 400-person company. This small size allowed the whole team to critique one another’s work on a weekly basis, and frequently bother someone at their desk. By the time I left Dropbox, the company was almost 2,000 people, and the design team had grown to about 60 people (including product designers, researchers, content strategists, and illustrators). We went through a series of changes to adjust for our growth, but in the design team there were a few notable ones.

Compiling Solid With Grunt Sass

Grunt-sass uses libsass to compile your sass. Use includePaths to make solid available as an scss import.

  sass: {
    dist: {
      options: {
        includePaths: 'node_modules/bf-solid/_lib'
 },
anonymous
anonymous / gist:ace84c8e4842c4850377
Created November 11, 2014 21:19
Rem Mixin
@function strip-unit($num) {
@return $num / ($num * 0 + 1);
}
@mixin rem($property, $values...) {
$max: length($values);
$pxValues: '';
$remValues: '';
@for $i from 1 through $max {
@tdrach
tdrach / mixins.scss
Last active October 16, 2015 17:38
Standard SCSS Mixins
@function strip-unit($num) {
@return $num / ($num * 0 + 1);
}
@mixin rem($property, $values...) {
$max: length($values);
$pxValues: '';
$remValues: '';
@for $i from 1 through $max {

Creating a layer

layer = new Layer
  width: 100
  height: 100

Animating a layer

@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark