Skip to content

Instantly share code, notes, and snippets.

@garyjohnson
garyjohnson / config.json
Created January 29, 2017 02:36
Repetier Firmware Configuration for Prusa i3 / E3D Titan
{
"editMode": 1,
"processor": 0,
"baudrate": 115200,
"bluetoothSerial": -1,
"bluetoothBaudrate": 115200,
"xStepsPerMM": 100,
"yStepsPerMM": 100,
"zStepsPerMM": 4000,
"xInvert": "1",
@garyjohnson
garyjohnson / 00-header
Created October 6, 2016 23:09
LeanDog MOTD header for AWS instances (drop in as replacement for /etc/update-motd.d/00-header)
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (C) 2009-2010 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@garyjohnson
garyjohnson / appium-adb-failure.txt
Created April 7, 2016 15:46
Appium failure to connect to android emulator, Android SDK Tools 25.1.1
[Appium] Welcome to Appium v1.5.1 (REV bf20a138788ae2355052619ab59a9b23c3b8e10a)
[Appium] Non-default server args:
[Appium] fullReset: true
[Appium] Deprecated server args:
[Appium] --full-reset => --default-capabilities '{"fullReset":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] fullReset: true
[HTTP] Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
Error: listen EADDRINUSE 0.0.0.0:4723
at Object.exports._errnoException (util.js:856:11)
@garyjohnson
garyjohnson / gary_prusa_i3_ramps_configuration.h
Last active December 1, 2015 01:10
Configuration for my first Prusa i3 (RAMPS, Marlin)
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//User specified version info of this build to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to this build by the user have been successfully uploaded into firmware.
@garyjohnson
garyjohnson / gary_prusa_i2_ramps_configuration.h
Last active December 1, 2015 01:10
Configuration for my Prusa i2 (RAMPS, Marlin)
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//User specified version info of this build to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to this build by the user have been successfully uploaded into firmware.
@garyjohnson
garyjohnson / GABWordnet.h
Created September 30, 2015 15:04 — forked from atduskgreg/GABWordnet.h
Thin wrapper around wordnet sql database for getting definitions of words on iOS. Add the wordnet.sqlite3 file to your project and the sqlite3 dylib to the build phases. I downloaded the sqlite db from here: https://code.google.com/p/synonym/downloads
//
// GABWordnic.h
// WordnicSqliteTest
//
// Created by Greg Borenstein on 8/3/14.
// Copyright (c) 2014 Greg Borenstein. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <sqlite3.h>
#!/bin/bash
sudo echo -e "@reboot root /usr/local/bin/pigpiod\n" >>/etc/cron.d/pigpiod
@garyjohnson
garyjohnson / install_kivy_1.10.0_macos_python3
Last active February 24, 2019 04:51
Install Kivy 1.10.0 on macOS for Python3 without Kivy.app
#!/bin/bash
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
pip3 install --upgrade Cython==0.25.2
# USE_OSX_FRAMEWORKS=0 pip3 install kivy # currently doesn't work due to incompatibility with SDL_mixer: https://github.com/kivy/kivy/pull/5459
USE_OSX_FRAMEWORKS=0 pip3 install http://github.com/kivy/kivy/archive/master.zip
# --- NOTES ----
# This is so you don't need to use Kivy.app -- I prefer that these deps install via pip and run via python like everything else.
# For python2, just use python2 version of pip
# I'm assuming usage of virtualenv here -- if you want to install globally, pip3 may require `sudo -H`
@garyjohnson
garyjohnson / virtualev-auto-activate.sh
Created February 13, 2015 14:13
virtualenv auto activate
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@garyjohnson
garyjohnson / build_qt5_raspbian.sh
Last active August 29, 2015 14:10
Build Qt5 natively on Raspberry Pi with distcc
#WIP
sudo apt-get update
sudo apt-get install gperf bison flex libfontconfig1-dev libdbus-1-dev libfreetype6-dev libudev-dev libicu-dev libsqlite3-dev libxslt1-dev libssl-dev libasound2-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libraspberrypi-dev libpulse-dev libx11-dev libglib2.0-dev libcups2-dev freetds-dev libsqlite0-dev libpq-dev libiodbc2-dev libmysqlclient-dev firebird-dev libpng12-dev libjpeg62-dev libgst-dev libxext-dev libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxi-dev libdrm-dev
mkdir ~/opt
cd ~/opt
git clone git://gitorious.org/qt/qt5.git
cd qt5
./init-repository
cd ~/opt/qt5