Skip to content

Instantly share code, notes, and snippets.

View jtebert's full-sized avatar
🤖
Making robots

Julia Ebert jtebert

🤖
Making robots
View GitHub Profile
@jtebert
jtebert / log.txt
Last active June 24, 2020 19:18
journalctl for gnome material shell
Jun 24 14:04:15 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym ff1b with keysym ff1b (keycode 9).
Jun 24 14:04:15 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym 6f with keysym 6f (keycode 20).
Jun 24 14:04:15 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym ff1b with keysym ff1b (keycode 9).
Jun 24 14:04:16 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym 6f with keysym 6f (keycode 20).
Jun 24 14:04:16 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym ff1b with keysym ff1b (keycode 9).
Jun 24 14:04:16 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym 6f with keysym 6f (keycode 20).
Jun 24 14:04:16 gnathosaurus gnome-shell[2292]: Window manager warning: Overwriting existing binding of keysym ff1b with keysym ff1b (keycode 9).
Jun 24 14:0

For the most up-to-date version of this, check docs.juliaebert.com.

Git Cheat Sheet

If something is wrong or missing or unclear, yell at Julia.

This walks through most of what you'll probably need to do with git in the command line. You can also read the full git documentation, but it's not very beginner friendly. A cool resource for interactively learning the more complex stuff (and understanding what's going on under the hood) is Learning Git Branching.

A lot of text editors and IDEs have git integration that will handle basic usage like staging, committing, pushing, pulling, and resolving merge conflicts, but they don't always handle (or are hard to use for) some of the more involved stuff (such as stashing and branching) described here.

@jtebert
jtebert / hsv-slider.html
Created August 1, 2018 02:39
Scalable HSV color slider with D3 and standard HTML range input
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
text-align: center;
}
#channels {
display: inline-block;
@jtebert
jtebert / ood-example.py
Created January 12, 2018 18:31
OOD Example (CS 189)
class Robot:
# An example class representing a robot
def __init__(self, robot_type, color):
"""
This is run when an instance of the class is created
:param robot_type: String representing the type of robot (humanoid, roomba, kilobot)
:param color: Color (string) of the robot
"""
self.color = color
@jtebert
jtebert / git-basics.md
Created January 12, 2018 17:41
Git basics (for CS 189)

Git basics

See the full git documentation

Set up a repository from scratch

Do this if you have an empty repository on Github.

  • Create a new repository on your machine (in an existing folder): git init
  • Add your empty GitHub repository as a remote: git remote add origin https://github.com/harvard-cs189/[REPO-NAME].git
@jtebert
jtebert / compressor.sh
Created October 25, 2017 13:13
A simple video compression script using ffmpeg (similar to resizer.sh)
#!/bin/bash
# A simple video compression script using ffmpeg (similar to resizer.sh)
# INPUTS: input_files width output/path
# EXAMPLE: compressor "videos/*.mp4" 1280 "videos/compressed"
mkdir -p $3
for i in $1;
do
path=${i%.*}
@jtebert
jtebert / resizer.sh
Last active September 22, 2017 17:25
A simple imagemagick script to compress images for the world wide web
#!/bin/bash
# A simple image resizer/compressor from here:
# https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/
#
# Note: You will likely have to set this file to be executable by running: chmod +x resizer.sh
#
# INPUTS: input_files width output/path
# EXAMPLE: ./resizer.sh "photos/*.jpg" 1920 "photos/compressed"
mkdir -p $3