Skip to content

Instantly share code, notes, and snippets.

View InternetofAwesome's full-sized avatar

Sam Anderson InternetofAwesome

View GitHub Profile
@InternetofAwesome
InternetofAwesome / 3mfout.swp
Last active May 27, 2024 01:58
Solidworks export to Bambu Studio button
' Setup:
' Create Macro:
' Open SolidWorks.
' Go to Tools > Macro > New.
' Save the macro file (e.g., SaveAs3MFAndOpen.swp).
' Add button to Macro:
' Go to Tools > Customize.
' In the Commands tab, select Macros.
@InternetofAwesome
InternetofAwesome / code.gs
Last active October 21, 2022 16:14
Export files from confluence to google docs, preserving links and original image image resolution
/* Create a new google script from within drive, after following the instructions in convert.sh (may be further down the gist page).
/ Make sure your google apps script lives within the same folder as your imported files
/ Open the script, and run the 'myFunction' script. After some effort, it worked for me, but I haven't tested *extensively*
/ This script has become kind of a mess, and I may not clean it up, but it works for me.
*/
const DRY_RUN = 0; //if nonzero, just simulate what would happen, and output in console
// If you uploaded the "attachments" directory with "Convert uploaded files to google docs editor format" setting enabled in drive, they will show up without a file extension, and throw an error when you try to lookup by name.
//If you uplodaded with this setting enabled, make sure to set this to 1, or the script may throw errors
@InternetofAwesome
InternetofAwesome / loadbin.sh
Last active March 26, 2020 01:48
Load Binary with JLinkExe
#load a bin using jlink to a memory address. Should "Just work"
#usage: loadbin <file name with or without path> <address>
function loadbin()
{
fname="$1"
addr="$2"
bn="$(basename $1)"
fn="${bn%.*}"
ext="${fname##.}"
if [ "$ext" != "bin" ]; then
@InternetofAwesome
InternetofAwesome / .xinitrc
Created March 14, 2017 06:41
synaptics xinitrc
#!/bin/bash
synclient TouchpadOff=1
synclient TouchpadOff=0
synclient PalmDetect=1
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient FingerLow=10
synclient FingerHigh=10
synclient TapButton1=-1
synclient TapButton3=2
@InternetofAwesome
InternetofAwesome / 50-synaptics.conf
Created December 2, 2016 17:10
Synaptics touchpad xorg config
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
MatchDevicePath "/dev/input/event*"
#Option "FingerLow" "46"
#Option "FingerHigh" "46"
@InternetofAwesome
InternetofAwesome / ethernet_priority.sh
Last active April 29, 2016 23:59
NetworkManager dispatch script to automatically prefer ethernet connections over wifi
#!/bin/bash
#NetworkManager dispatch script to automatically prefer ethernet connections
#over wifi
#This will disconnect wifi when ethernet is up, connect wifi when ethernet goes
#down, and bring wifi down if it comes up while ethernet is up
echo $0 $1 $2 | wall
iftype=$(echo $1 | grep -ho '[^0-9]*')