Skip to content

Instantly share code, notes, and snippets.

@inkychris
inkychris / multichannel_split.lua
Last active May 16, 2018 09:43
Reaper script to create mono tracks for multitrack source filesand selecting the take channel mode rather than rendering new mono sources.
local label = "Multichannel Split"
function SetMediaItemMonoChannel(mediaItem, channel)
local itemTake = reaper.GetActiveTake(mediaItem)
reaper.SetMediaItemTakeInfo_Value(itemTake, "I_CHANMODE", 2 + channel)
end
local function MaxProjectGroupID()
local mediaItemCount = reaper.CountMediaItems(0)
local MaxGroupId = 0
@inkychris
inkychris / pre_post.gcode
Last active May 4, 2019 17:07
Slic3r Pre/Post Gcode
[ START GCODE ]
---------------
M140 S[bed_temperature]
G28 ;Home
M190 S[bed_temperature]
M109 S[first_layer_temperature_0]
G90 ;Absolute positioning
G1 Z1 F6000 ;Move the head up slightly
G92 E0 ;Reset extruder
G1 F200 E5 ;Extrude filament onto buildplate
@inkychris
inkychris / bed-levelling.py
Created July 2, 2018 20:28
3D Printing: Python script to generate a bed levelling gcode file for moving the print head sequentially around the build-plate to aid in bed levelling.
# All values are in mm
bed_x_max = 200
bed_y_max = 200
z_hop = 1
inset = 40 # distance in from edges of buildplate to stop at
wait_time = 10 # seconds
repetitions = 5 # Number of times to visit each coordinate
bed_temp = 55 # Bed temperature in Degrees C
file_name = "bed-levelling-{}.gcode".format(inset)
@inkychris
inkychris / Dockerfile
Created October 17, 2018 11:07
Minimal TeX Docker Image
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
wget \
perl \
libfontconfig
RUN wget "https://yihui.name/gh/tinytex/tools/install-unx.sh"
RUN chmod +x install-unx.sh
RUN ./install-unx.sh
@inkychris
inkychris / Custom.3.0.binds
Last active January 2, 2019 15:18
Elite Dangerous T16000m HOTAS Key Binds
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Custom" MajorVersion="3" MinorVersion="0">
<KeyboardLayout>en-GB</KeyboardLayout>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@inkychris
inkychris / windock_inkysnap.json
Last active March 31, 2021 07:56
WinDock Inkysnap
{
"name": "Inkysnap",
"rules": [
{
"dock": {
"monitor": 0,
"values": [
20,
0,
80,
@inkychris
inkychris / note.txt
Last active February 15, 2019 21:06
Windows 10 Customisations
Disable Lockscreen:
gpedit:
- Administrative Templates/Control Panel/Personalization/Do not display the lock screen
Show Seconds in Taskbar Clock:
regedit:
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
- New > DWORD (32-bit) Value > ShowSecondsInSystemClock> 1
Remove Icons from Taskbar:
@inkychris
inkychris / slowprint.go
Created March 13, 2019 14:01
A test program for printing slowly to STDOUT
package main
import (
"fmt"
"os"
"strconv"
"time"
)
func main() {
@inkychris
inkychris / .minttyrc
Created March 15, 2019 14:33
Git Bash Theme - Monokai
Font=Consolas
FontHeight=12
FontSmoothing=full
AllowBlinking=yes
Columns=128
Rows=64
PgUpDnScroll=yes
ThemeFile=
Transparency=
BoldAsFont=no
@inkychris
inkychris / argparser.regex
Created April 12, 2019 14:26
Basic Argument Parsing Regular Expression
(?:\s|\A)(?:(?:--test)[\s=]?)(.+?)(?:\s|\z)