Skip to content

Instantly share code, notes, and snippets.

View rpeshkov's full-sized avatar

Roman Peshkov rpeshkov

View GitHub Profile
@JohnScottUK
JohnScottUK / creality_ender3s1pro.cura.start.gcode
Last active September 29, 2024 08:32
Ender 3 S1 Pro Optimal Start/Stop GCode for Creality/Cura Slicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for Cura Slicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/8acd76895716b3abda4fde270738daf3
;M117 Set Movement...
G90; Use absolute positioning.
M83; Use relative extrusion.
;M117 Heating Bed...
M140 S{material_bed_temperature_layer_0}; Start heating bed.
@wiverson
wiverson / HOWTO-java-macos.md
Last active April 24, 2024 19:37
HOWTO make a Java Swing app look great on macOS

All of this has been confirmed to work on macOS Big Sur (11.2.3) and JDK 16.

macOS Menu Bar

To put the menu bar at the top of the screen, use the following

System.setProperty("apple.laf.useScreenMenuBar", "true");

// Use this method to set the menu bar.
@RyanMillerC
RyanMillerC / set-primary-monitor-pantheon-greeter
Last active November 7, 2020 13:29
Set correct primary monitor for login screen when lightdm greeter starts up on Elementary OS
#!/bin/bash
#
# Created: 2017-07-02 16:20
# Updated: 2018-02-09 12:23
# Creator: Ryan Miller
# Website: http://devopsmachine.com/
# File: /usr/local/bin/set-primary-monitor-pantheon-greeter
#
# Set correct primary monitor for login screen when lightdm greeter starts up on Elementary OS.
#
@comex
comex / wormdump.c
Created April 9, 2015 06:07
Some old broken code in case it helps anyone
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/kern_event.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <net/ethernet.h>
@junegunn
junegunn / gist:f4fca918e937e6bf5bad
Last active November 4, 2024 10:33
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
@ruda
ruda / listchars.vim
Last active September 8, 2024 15:38
Vim: listchars samples
set listchars=tab:→\ ,trail:␣,extends:…,eol:⏎
set listchars=tab:→\ ,trail:␣,precedes:«,extends:»,eol:⏎
set listchars=tab:→\ ,trail:·,precedes:«,extends:»,eol:¶
set listchars=tab:‣\ ,trail:·,precedes:«,extends:»,eol:¬
set listchars=tab:␋\ ,trail:␠,precedes:«,extends:»,eol:␤
set listchars=tab:>-,trail:.,precedes:<,extends:>,eol:$
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active October 20, 2024 14:41
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 1, 2024 17:40
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a