Skip to content

Instantly share code, notes, and snippets.

View bruj0's full-sized avatar
🎯
Focusing

Rodrigo D. L. bruj0

🎯
Focusing
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@cmidgley
cmidgley / voron_24_printed_parts.md
Last active April 2, 2024 15:59
Printed parts list for the Voron 2.4 organized by assembly order

Voron 2.4 Printed Parts List

List of parts to print for Voron 2.4 organized by the Assembly Manuals order of assembly, allowing for just-in-time printing of parts while building the printer. Configuration is standard Voron 2.4 (Afterburner Direct Feed, DIN rail mounts) with choices for E3D, Dragon or Mosquito hot ends on a 250mm, 300mm or 350mm frame. No parts for the drag chain are included, as often these are purchased parts rather than printed.

Names of the sections (such as Gantry/X_Axis/XY Joints) match the name of the STL directory that contains the prints. Note that Voron Design uses filenames starting with [a]_ at the start of a filename to indicate parts that can be printed in an accent color.

_Credit to krobertson for maki

@AhmedMostafa16
AhmedMostafa16 / .font.conf
Created July 25, 2021 13:39
My .font.conf for perfect font rendering
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>~/.fonts</dir>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@Jimmy-Z
Jimmy-Z / pve-cloud-init-template-debian.sh
Last active April 16, 2024 18:47
create a Debian VM template for Proxmox VE
#!/bin/sh
# apt install curl
# obviously change this per your needs
VMID=9001
STOR=local-lvm
VER=20230124-1270
URL_PATH=https://cloud.debian.org/images/cloud/bullseye/$VER/
IMG=debian-11-genericcloud-amd64-$VER.qcow2
@sabarjp
sabarjp / gcode start for ender3 in prusaslicer with bltouch
Last active February 22, 2023 17:20
gcode start ender3 prusaslicer
M117 Heating... ;Put printing message on LCD screen
M300 S2500 P100; Beep
M204 T1250 ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2
M221 S{if layer_height<0.075}100{else}100{endif} ; Set flow
M104 S140 ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
;G1 Z50 ; this is a good start heating position
G28 X Y; Home X Y
G1 Y10 ; this is a good start heating position
@kawsark
kawsark / Vault-ssh-ca-README.md
Created March 28, 2019 16:12
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.

Prerequisites

  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
  • VAULT_SERVER
@krzysztof-slowinski
krzysztof-slowinski / sftp_sync.py
Last active January 25, 2023 05:43
Pysftp - get only the changed files from the remote directory
import os
import configparser as cp
import shutil
import pysftp
import paramiko
from paramiko.py3compat import decodebytes
# credentials file name
CREDENTIALS_FILE = 'sftp_sync_credentials.properties'
@RulerOf
RulerOf / vwlc-on-kvm.md
Last active December 29, 2023 07:01
How to install the Cisco vWLC on KVM using virt-install

Installing the Cisco vWLC on KVM using virt-install

Cisco has a few different guides for installing their vWLC on KVM, but most of them focus on oVirt-style installations that are heavy on hand-crafted XML and [what appears to be] the use of OpenStack. If you're just using a plain single-host KVM setup and want to install the vWLC in a VM, this guide is for you.

Instructions

First, download the vWLC KVM installation image appropriate for your setup. I'm going to use version 8.5.171.0 (you'll have to create an account to download it), and then transfer it to your KVM server:

AndrewBobulskys-MacBook-Pro:~ andrewbobulsky$ scp ~/Downloads/MFG_CTVM_LARGE_8.5.171.0.iso 10.0.25.2:/tmp                   100%  367MB  40.7MB/s   00:09    
@Waltibaba
Waltibaba / lxc_mount_block_device
Last active April 26, 2024 04:13
Mount a block device like HDD inside an LXC container (specifically in proxmox 4)
Mounting block device in lxc (specifically Proxmox 4)
1. Find devices' major & minor ID (need both dev + partition for HDD)
# ls -al /dev/sda
brw-rw---- 1 root disk 8, 0 Dec 19 11:16 /dev/sda1
# ls -al /dev/sda1
brw-rw---- 1 root disk 8, 1 Dec 19 11:16 /dev/sda1
That's 8,0 for sda and 8,1 for sda1
@jlafon
jlafon / dynamodb.md
Created December 3, 2014 05:03
An Introduction to Amazon's DynamoDB

An introduction to DynamoDB

DynamoDB is a powerful, fully managed, low latency, NoSQL database service provided by Amazon. DynamoDB allows you to pay for dedicated throughput, with predictable performance for "any level of request traffic". Scalability is handled for you, and data is replicated across multiple availability zones automatically. Amazon handles all of the pain points associated with managing a distributed datastore for you, including replication, load balancing, provisioning, and backups. All that is left is for you to take your data, and its access patterns, and make it work in the denormalized world of NoSQL.

Modeling your data

The single most important part of using DynamoDB begins before you ever put data into it: designing the table(s) and keys. Keys (Amazon calls them primary keys) can be composed of one attribute, called a hash key, or a compound key called the hash and range key. The key is used to uniquely identify an item in a table. The choice of the primary key is particularl