Skip to content

Instantly share code, notes, and snippets.

View nguyenvinhlinh's full-sized avatar
💭
Open for hiring

Nguyen Vinh Linh nguyenvinhlinh

💭
Open for hiring
View GitHub Profile
@Borillion
Borillion / printer.cfg
Last active October 27, 2024 21:27
k1 max printer cfg
# K1-MAX
# Printer_size: 300x300x300
# Version: v1.0.22
# CreateDate: 2023/03/21
# Nozzle_mcu: chip: GD32F303CBT6
# version: K1-NOZZLE-M_V12
# Leveling_mcu: chip: GD32E230F8P6
# version: K1-MAX-L-V11
# mcu: chip: GD32F303RET6
# version: CR4CU220812S12
@nguyenvinhlinh
nguyenvinhlinh / keybindings.pl
Created January 16, 2023 07:33 — forked from elgalu/keybindings.pl
Export Ubuntu shortcuts: keybindings.pl -e keys.csv ;; Import (DANGER) Ubuntu shortcuts: keybindings.pl -i keys.csv
#!/usr/bin/perl
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
if ($arg eq "-e" or $arg eq "--export"){
$action = 'export';
@phartenfeller
phartenfeller / Oracle Instant Client on Debian or Ubuntu
Last active March 18, 2025 09:37
Install an oracle instant client on a Debian or Ubuntu linux
apt-get install -y libaio1 alien
# Change version based on https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html
# Example alternative: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.5-basiclite-19.5.0.0.0-1.x86_64.rpm
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
# Optionally install SQLPlus
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
@jimm
jimm / pingpong_with_count.exs
Created January 31, 2019 14:49
Elixir process receive loop / state / response example
#!/usr/bin/env elixir
defmodule Sync do
def pingpong do
# Create process and save pid.
child = spawn(Sync, :loop, [0]) # module, sym, args
# Send some messages to the child
send(child, {self(), :count})
@henrik
henrik / 1-progressive_downloader.ex
Last active December 4, 2020 05:41
Example of progressive downloading with HTTPotion, showing percentage and downloaded bytes as you go.
defmodule ProgressiveDownloader do
def run do
url = "https://ia600308.us.archive.org/2/items/HealthYo1953/HealthYo1953_512kb.mp4"
HTTPotion.get url, stream_to: self, timeout: :infinity
receive_data(total_bytes: :unknown, data: "")
end
defp receive_data(total_bytes: total_bytes, data: data) do
@elgalu
elgalu / keybindings.pl
Created January 19, 2014 22:27
Export Ubuntu shortcuts: keybindings.pl -e keys.csv ;; Import (DANGER) Ubuntu shortcuts: keybindings.pl -i keys.csv
#!/usr/bin/perl
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
if ($arg eq "-e" or $arg eq "--export"){
$action = 'export';