Skip to content

Instantly share code, notes, and snippets.

View sergio1990's full-sized avatar
🇺🇦

Serhii Herniak sergio1990

🇺🇦
View GitHub Profile
; time = {time}
; date = {date}
; day = {day}
; initial_extruder_nr = {initial_extruder_nr}
; material_id = {material_id}
; material_type = {material_type}
; material_name = {material_name}
; material_brand = {material_brand}
; print_time = {print_time}
; filament_amount = {filament_amount}
; acceleration_enabled = {acceleration_enabled}
; acceleration_infill = {acceleration_infill}
; acceleration_ironing = {acceleration_ironing}
; acceleration_layer_0 = {acceleration_layer_0}
; acceleration_prime_tower = {acceleration_prime_tower}
; acceleration_print = {acceleration_print}
; acceleration_print_layer_0 = {acceleration_print_layer_0}
; acceleration_roofing = {acceleration_roofing}
; acceleration_skirt_brim = {acceleration_skirt_brim}
; acceleration_support = {acceleration_support}
@mperham
mperham / frag.rb
Last active April 26, 2023 18:22
memory fragmentation on ruby 2.5.1
=begin
This script attempts to reproduce poor glibc allocator behavior within Ruby, leading
to extreme memory fragmentation and process RSS bloat.
glibc allocates memory using per-thread "arenas". These blocks can easily fragment when
some objects are free'd and others are long-lived.
Our script runs multiple threads, all allocating randomly sized "large" Strings between 4,000
and 40,000 bytes in size. This simulates Rails views with ERB creating large chunks of HTML
to output to the browser. Some of these strings are kept around and some are discarded.

AVR Programming on Linux/Mac OS

Dependencies for Mac

Mac users will need to install Homebrew. Homebrew is a package manager for MacOS.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You will then need to install avr-libc from the avr repository.

@tombigel
tombigel / README.md
Last active May 2, 2024 02:47 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@dKvale
dKvale / EC2_web_server.md
Last active February 22, 2024 08:01
Quick setup for hosting a static website on Amazon EC2 server.

Github pages -> Amazon EC2 server

0) Login to the EC2 Amazon Console

https://console.aws.amazon.com/console/home

1) In the EC2's Security group section add an inbound rule to open ports 80 and 443

Type: HTTP, Protocol: TCP, Port: 80, Source: 0.0.0.0/0
Type: HTTPS, Protocol: TCP, Port: 443, Source: 0.0.0.0/0

2) Copy the Public DNS for your EC2 instance

@briankung
briankung / docker-pry-rails.md
Last active December 12, 2023 10:40
Using pry-rails with Docker

First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails

gem 'pry-rails', group: :development

Then you'll want to rebuild your Docker container to install the gems

@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@ankurk91
ankurk91 / github_gpg_key.md
Last active April 9, 2024 16:34
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/