Skip to content

Instantly share code, notes, and snippets.

View danylkaaa's full-sized avatar

Danylo Kazymyrov danylkaaa

View GitHub Profile
@MineRobber9000
MineRobber9000 / README.md
Created July 7, 2020 03:29
Import Python modules from GitHub

githubimport

Allows you to import Python modules from the top level of a GitHub repository. Basically, golang's import semantics but in Python fashion.

>>> import githubimport
>>> from MineRobber9000.test_modules import blah
>>> blah.foo()
"bar"
@kind3r
kind3r / Prusa Slicer Startup.gcode
Last active November 10, 2023 03:40
3D Printer start G-code for Prusa Slicer
M104 S150 ; start heating the extruder a bit to save some time but prevent oozing
M140 S[first_layer_bed_temperature] ; heatbed temperature
M190 S[first_layer_bed_temperature] ; wait for the bed to heat up
M83 ; extruder relative mode
G28 ; home all axes
G29 ; Bed autolevel (optional, for BLTouch only)
G92 E0 ; reset extruder
G1 X0 Y0 F5000 ; move to 0/0/0
G1 Z0
@troyfontaine
troyfontaine / 1-setup.md
Last active July 6, 2024 22:42
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@squarism
squarism / iterm2.md
Last active July 7, 2024 05:11
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs