Skip to content

Instantly share code, notes, and snippets.

View fagnercarvalho's full-sized avatar

Fagner Nunes Carvalho fagnercarvalho

View GitHub Profile
@fagnercarvalho
fagnercarvalho / Dockerfile
Last active June 7, 2021 03:10
SpaceVim Rust Development Environment
FROM spacevim/spacevim
ENV RUSTUP_HOME=/rust
ENV CARGO_HOME=/cargo
ENV PATH=/cargo/bin:/rust/bin:/home/spacevim:$PATH
USER root
RUN mkdir /home/spacevim/projects && chmod -R 777 /home/spacevim/projects
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
@fagnercarvalho
fagnercarvalho / getblob.ps1
Last active February 25, 2021 01:44
Get blob from SQL Server database
## Export of "larger" Sql Server Blob to file
$Server = ".";
$Database = "DatabaseName";
$Dest = "C:\Export\";
$bufferSize = 8192;
$Sql = "select TOP 1 'Image.png', COLUMN from TABLE";
$con = New-Object Data.SqlClient.SqlConnection;
$con.ConnectionString = "Data Source=$Server;" +
@fagnercarvalho
fagnercarvalho / ddns.md
Last active February 21, 2021 23:55
Use DDNS on Cloudflare
curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" -H "Authorization: Bearer <API TOKEN>" -H "Content-Type:application/json"
@fagnercarvalho
fagnercarvalho / ssh.md
Last active February 20, 2021 21:32
Import SSH key into Raspberry PI (or any Linux host really)
  • Generate the private/public keys pair
ssh-keygen -t ecdsa -b 521
  • Import public key into your server
cat ~/.ssh/id_ecdsa_rpi.pub | ssh pi@raspberrypi.lan "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
@fagnercarvalho
fagnercarvalho / webcam.md
Last active January 31, 2021 23:53
Use webcam in Raspberry PI
@fagnercarvalho
fagnercarvalho / links.md
Last active March 2, 2021 05:49
Links to learn k8s
@fagnercarvalho
fagnercarvalho / commands.sh
Created October 10, 2020 20:48
Install bluealsa and pair/connect to Bluetooth device in Linux
# Install bluealsa to create interface to Bluetooth device
git clone https://github.com/Arkq/bluez-alsa.git
cd bluez-alsa
su
apt-get install libglib2.0-dev -y
apt-get install -y libasound2-dev
apt install -y build-essential autoconf
apt-get install -y libbluetooth-dev
apt-get install libtool -y
@fagnercarvalho
fagnercarvalho / help links
Last active September 29, 2020 02:50
My settings for Windows Terminal