Skip to content

Instantly share code, notes, and snippets.

View gbroques's full-sized avatar

G Roques gbroques

View GitHub Profile
@gbroques
gbroques / git-commands.md
Last active April 18, 2018 00:56
Useful Git Commands

Useful Git Commands

Commiting

Show the current status of your repo.

  • git status

Show a diff between your changes and what's in the repo.

  • git diff [filename]
@gbroques
gbroques / docker-commands.md
Last active October 14, 2018 16:39
Useful Docker Commands

Building Images

By default, Docker looks for a file named Dockerfile when building images.

  • docker build -t express-prod-i .
    • -t - Optionally tag, or name a docker image to avoid referring to the auto-generated ID (e.g. 50e8dde7e180)
    • . - Look for the Dockerfile in the current directory
    • -f - Override default Dockerfile name

Dockerfile

  • RUN - Is an image build step
@gbroques
gbroques / asyncSum.js
Created March 22, 2019 21:19
Asynchronous Sum Example with Callbacks, Promises, and Async / Await
/**
* Asynchronous sum example with callbacks.
*/
function getX(callback) {
setTimeout(() => {
callback(5);
}, 1000);
}
@gbroques
gbroques / exercise-routine.md
Last active November 17, 2019 22:01 — forked from aroques/exercise-routine.md
Exercise Routine

Day 1 - General Physical Preparedness (GPP)

Original Strength (OS)

  • Segmental Rolling
  • Rocking (quadrupal, elbows)
  • OS push ups
  • Head nods (up-down, side-to-side)

Movnat/Ground Movement (mainly squat/leg mobility)

  • Backwards rocking
@gbroques
gbroques / vim-commands.md
Last active April 15, 2023 00:18
My personal cheat-sheet to remember and help me learn vim commands.

Vim Commands

Language

Most editors treat inserting text as the primary action. Vim treats changing text as the primary action.

  • Verb + Noun (e.g. dw - "delete word")

Verbs (Operators)

Act upon Motions or Text Objects.

@gbroques
gbroques / freecad-class-inheritance-diagram.plantuml
Last active May 3, 2020 21:05
FreeCAD Class Inheritance Diagram
@startuml
class App::DocumentObject [[https://wiki.freecadweb.org/App_DocumentObject]]
class App::GeoFeature [[https://wiki.freecadweb.org/App_GeoFeature]]
note left [[http://plantuml.com]]
Adds Placement property
end note
App::DocumentObject <|-- App::GeoFeature [[http://plantuml.com/class]] : extends
@enduml
@gbroques
gbroques / make_hexagonal_prism.py
Last active August 4, 2020 11:25
Make a hexagonal prism in FreeCAD.
from math import radians, sqrt
import Part
from FreeCAD import Matrix, Vector
def make_hexagonal_prism(minimal_diameter: float, height: float) -> Part.Solid:
hexagon_wire = make_hexagon_wire(minimal_diameter)
hexagon_face = Part.Face(hexagon_wire)
return hexagon_face.extrude(Vector(0, 0, height))
@gbroques
gbroques / quotes.md
Last active December 30, 2020 03:38
A collection of my favorite personal quotes.

The assumption that what currently exists must necessarily exist is the acid that corrodes all visionary thinking.

― Murray Bookchin


The reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.

― George Bernard Shaw

@gbroques
gbroques / vs-code-ose-workbench-platform-extension-install.sh
Created August 15, 2020 00:59
Installation instructions for recommended OSE Workbench Platform VS Code extensions.
code --install-extension [email protected] \
--install-extension [email protected] \
--install-extension njpwerner.autodocstring
@gbroques
gbroques / git-tips.md
Last active November 14, 2020 20:25
Lesser known Git tips and tricks.