Skip to content

Instantly share code, notes, and snippets.

View benjamincharity's full-sized avatar
🤖

Benjamin Charity benjamincharity

🤖
View GitHub Profile
@benjamincharity
benjamincharity / autonomous.txt
Last active April 21, 2026 08:49
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@benjamincharity
benjamincharity / lowercase.snippet
Created June 28, 2017 18:18
Change the casing of a snippet variable.
# Module
# NOTE: The last line lowercases the first letter of the 1st variable and stores it as the 2nd
# variable
snippet uim "Create a UI module" m
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
/*
*import {
* MdButtonModule,
*} from '@angular/material';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {
MdIconModule,
MdInputModule,
} from '@angular/material';
import { TsSearchComponent } from './search.component';
@benjamincharity
benjamincharity / circleUrl.sh
Created June 12, 2017 11:56
Poll CircleCI build status with CCMenu.
https://circleci.com/cc.xml?circle-token=[circle-token]
@benjamincharity
benjamincharity / copyAndRename.sh
Created June 5, 2017 13:15
Copy and rename a file from the command line (for use in NPM script). Requires https://github.com/mysticatea/cpx
node_modules/.bin/cpx dist/*.css styleguide && for f in styleguide/*.css; do mv \"$f\" \"styleguide/raw-styles.css\"; done
@benjamincharity
benjamincharity / z-index.scss
Last active May 30, 2017 02:14
Determine z-index based off of a list. This allows new items to be added without needing a refactor.
$z-layers: (
"header",
"menu",
"menu-trigger",
);
/////////////////////////////////////////////
//
// Determine the correct z-index
//
@benjamincharity
benjamincharity / sass-lint.yml
Created May 29, 2017 16:40
Sass Lint config file
# sass-lint config
# https://github.com/sasstools/sass-lint/tree/master/docs/rules
files:
include: 'src/**/*.s+(a|c)ss'
ignore:
- 'node_modules/**/*.s+(a|c)ss'
options:
formatter: stylish
rules:
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
@benjamincharity
benjamincharity / colors.scss
Created May 29, 2017 16:37
Manage colors via a method and a map.
// Palettes color map
$palettes: (
mapPrimary: (
xlight: material-color('indigo', '200'), // #9FA8DA
light: material-color('indigo', '500'), // #3F51B5
base: material-color('indigo', '700'), // #303F9F
dark: material-color('indigo', '900') // #1A237E
),
mapAccent: (
light: material-color('cyan', '100'), // #B2EBF2
@benjamincharity
benjamincharity / breakpoints.scss
Last active May 29, 2017 16:49
Manage CSS breakpoints via mixin. Sizes based off of Material's breakpoints.
///////////////////////////
//
// Breakpoints Mixin
//
@mixin bp($point) {
@if $point == 'layout-xs' {
@media (max-width: 599px) { @content; }
}