Skip to content

Instantly share code, notes, and snippets.

View pdxmike's full-sized avatar
🌮
Powered by taco.

Mike Hickman pdxmike

🌮
Powered by taco.
View GitHub Profile
@benjamincharity
benjamincharity / autonomous.txt
Last active May 17, 2024 22:47
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.

React && Firebase Workshop

Contact Information

Prequisite Setup

  • A recent version of Node.js
  • npm install -g create-react-app

Git Cheat Sheet

Basic commands

git init Creates a new git repository in the directory

git add <file name> Adds a specific file to staging

git add . or git add -A Adds the full directory and its contents to staging

@neilgee
neilgee / custom-provision.sh
Created July 13, 2015 02:58
Custom VVV Variable Provisioning for WordPress sites
# #!/bin/bash
# #
# # provision.sh
# #
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# # or `vagrant reload` are used. It provides all of the default packages and
# # configurations included with Varying Vagrant Vagrants.
# # By storing the date now, we can calculate the duration of provisioning at the
@arjunvenkat
arjunvenkat / gist:1115bc41bf395a162084
Last active January 12, 2024 05:04
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@alexpchin
alexpchin / Rails_Generating_and_Scaffolding.md
Last active April 2, 2024 12:24
Rails Generating & Scaffolding

Rails Generating & Scaffolding

Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.

This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...

Coming from another language like PHP, this can seem like magic.

@rdetert
rdetert / states.rb
Last active March 30, 2023 17:53 — forked from dblandin/states.rb
Hash of the United States in Ruby
::States = { AK: "Alaska",
AL: "Alabama",
AR: "Arkansas",
AS: "American Samoa",
AZ: "Arizona",
CA: "California",
CO: "Colorado",
CT: "Connecticut",
DC: "District of Columbia",
DE: "Delaware",
@speric
speric / poodir-notes.md
Last active May 15, 2024 13:39
Notes From "Practical Object-Oriented Design In Ruby" by Sandi Metz

Chapter 1 - Object Oriented Design

The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.

SOLID Design:

  • Single Responsibility Principle: a class should have only a single responsibility
  • Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
  • Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
@averygoodplanet
averygoodplanet / budget.rb
Last active May 11, 2020 05:29
How to simulate devise's current_user variable in rspec unit tests?
class Budget < ActiveRecord::Base
belongs_to :user
has_many :categories, dependent: :destroy
end
@studiopress
studiopress / call-to-action-banner.html
Last active July 22, 2021 22:16
Executive Pro Gists
<div class="three-fourths first">Here's a great place to write something specific that you want your visitors to read.</div>
<div class="one-fourth"><a class="button alignright" href="#">Contact Us Today</a></div>