Skip to content

Instantly share code, notes, and snippets.

View cpjolicoeur's full-sized avatar

Craig P Jolicoeur cpjolicoeur

View GitHub Profile
#
# Klipper configuration file for Anycubic i3 MEGA S
#
# This config file contains settings of all printer pins (steppers, sensors) for Anycubic i3 mega S with TMC2208 Drivers with stock plug orientation
# Klipper firmware should be compiled for the atmega2560
#
# Config file includes
# - Original or 2208(2209) rotated by cable drivers
# - Mesh bed leveling: BLtouch (3DTouch sensor from Triangelab)
# - Manual meshed bed leveling (commented out)
@cpjolicoeur
cpjolicoeur / upgrade.md
Created March 6, 2017 15:56 — forked from chrismccord/upgrade.md
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@cpjolicoeur
cpjolicoeur / haproxy.cfg
Last active August 29, 2015 14:17 — forked from wkf/haproxy.cfg
# -*- mode: haproxy -*-
# vi: set ft=haproxy :
defaults
log global
mode http
option forwardfor
option dontlognull
option redispatch
option http-server-close

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@cpjolicoeur
cpjolicoeur / .tigrc
Last active August 31, 2017 07:16 — forked from aesnyder/.tigrc
bind generic f !@git fetch
bind generic p !@git pull
bind generic P !@git push
bind generic { !?git push -f
bind generic r !git rebase -i master
bind generic U !@sh -c "git checkout master && git pull && git checkout - && git rebase master"
bind generic M !@git checkout master
bind generic ! !@git reset HEAD^
bind generic @ !@?git reset --hard HEAD^
bind generic a !git commit --amend
@cpjolicoeur
cpjolicoeur / gist:1855097
Created February 17, 2012 19:50 — forked from folke/gist:1453374
Gmail to OmniFocus
javascript:(function(){
if(top.document == document) {
var msg = document.getElementById("canvas_frame");
if(msg){
subjectEl = msg.contentDocument.getElementsByClassName("hP");
subject = subjectEl[0].innerText;
bodyEl = msg.contentDocument.getElementsByClassName("adP");
body = bodyEl[0].innerText;
# Copyright 2010, Iain Hecker. All Rights Reserved
# Conway's Game of Life, in one line of Ruby.
# http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
# Tested and found working on Ruby 1.8.7 and 1.9.2
# The grid is spherical or "wrap around", so the left is connected to the right and top to bottom.
#
# Generate a random grid, 30 cells wide and 10 cells high
#
# grid = "30x10".to_grid
#
# use the ubuntu machine gem
require 'capistrano/ext/ubuntu-machine'
# #######################################
# HOSTING PROVIDER CONFIGURATION
# Those tasks have been tested with severa hosting providers
# and sometimes tasks are specific to those providers
set :hosting_provider, "slicehost" # currently supported : ovh-rps, ovh-dedie, slicehost

Why build a site? Why do your customers care?

The core purpose of a website is to help your customers answer the questions necessary to do business with you.

If your website is a series of answers to questions then the success of your site depends on what questions you answer--it's the questions and answers that show the customer you provide a service they're looking for, you're a good choice and that they should buy from you.

In general every customer has the following questions:

  1. Who are you?
  2. What do you offer?
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"