Start gcode
G4 P2000 ;pause for paneldue
M104 S130 ; set extruder temp
G28 ;home
M190 S[first_layer_bed_temperature] ;heat bed
G32 ;autocalibration - set grid on/off in bed.g
M564 S0 ;disable movement limits
G1 Z15 X47.7 Y-160.1 F3000 ;move to front
M109 S[first_layer_temperature] ; set extruder temp
G1 E20 F100 ;extrude 20mm slowly
G4 P1500 ;pause
G1 Z4 X40 Y-168 F6000 ;move down to swipe filament off
G1 Z2 X0 Y0 F6000 ;move to bed centre
M564 S1 ;restore movement limits
M220 S100 ;optional speed control default 100
Most of it is self-explanatory. What I do is after heating bed and extruder, autocalibrate as I want bed heated and nozzle semi-heated, then disable movement limits (caution doing this) to allow me to stick my nozzle just over the edge of the bed, heat to 1st layer temp, so any ooze doesn't fall on the bed, and extrude a little filament to prime, which falls on the floor next to the printer. This way I get "auto-start" I don't need to attend to the machine after starting a print. The speed control gcode is in case I want to print something very slowly like flexible, I can set this temporarily in slic3r.
End gcode
M220 S100 ; set speed back to 100%
M104 S0 ; turn off nozzle temperature
M140 S0 ; turn off bed temperature
M141 S0 ; turn off chamber heater
G28 ; home
M84 ; disable motors
M106 S0 ; part fans off
Here I set speed back to 100% in case I have been doing high speed printing, I don't want to try to home at 200 mm/s!
Please note the use of variables like [first_layer_temperature] are specific to slic3r/Prusa slic3r, I'm not sure they work with any other slicer.
Printer is a Kossel XL Delta.