Skip to content

Instantly share code, notes, and snippets.

View CosminEugenDinu's full-sized avatar

Cosmin Eugen Dinu CosminEugenDinu

  • Bucharest, Romania
View GitHub Profile
@CosminEugenDinu
CosminEugenDinu / convert-postman-to-insomnia.js
Created April 1, 2022 08:57 — forked from wesleyegberto/convert-postman-to-insomnia.js
Script to convert a Postman backupt to Insomnia
/**
* Script to parse a Postman backupt to Insomnia keeping the same structure.
*
* It parses:
* - Folders
* - Requests
* - Environments
*
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS).
*/
@CosminEugenDinu
CosminEugenDinu / Colourized PowerShell
Created October 24, 2021 12:44 — forked from haf/Colourized PowerShell
Colourized PowerShell ls command
#First in your powershell profile in
#C:\Users\<<username>>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
set-location D:\code
. "C:\Users\<<username>>\Documents\WindowsPowerShell\Get-ChildItemColor.ps1" # read the colourized ls
set-alias ls Get-ChildItemColor -force -option allscope
function Get-ChildItem-Force { ls -Force }
set-alias la Get-ChildItem-Force -option allscope
#Then in:
#!/usr/bin/env bash
### MySQL debian package version name ###
mysql_apt_deb=mysql-apt-config_0.8.18-1_all.deb
# uninstall existing mysql 8
sudo service mysql stop
sudo apt remove --purge mysql-common -y # Remove data directories? <Yes>
sudo apt remove --purge mysql-community* -y
sudo apt remove --purge mysql-apt-config -y
@CosminEugenDinu
CosminEugenDinu / nodejs-tcp-example.js
Created June 23, 2021 07:44 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@CosminEugenDinu
CosminEugenDinu / SerialPortReader.ps1
Created May 18, 2021 07:10 — forked from heiswayi/SerialPortReader.ps1
PowerShell Script - Serial Port Reader
<#
.SYNOPSIS
Listens to and read data from a serial port (e.g. COM port)
.DESCRIPTION
The purpose of this script is to keep listening and read data from a serial port.
All the data captured will be displayed and log into a file.
.EXAMPLE
./SerialPortReader.ps1
.EXAMPLE
./SerialPortReader.ps1 -PortName COM3 -BaudRate 9600
@CosminEugenDinu
CosminEugenDinu / svg2pdf.bash
Created May 12, 2021 23:40 — forked from s417-lama/svg2pdf.bash
Reliable way to convert an SVG file to a PDF file using headless Chrome
#!/bin/bash
#
# Convert an SVG file to a PDF file by using headless Chrome.
#
if [ $# -ne 2 ]; then
echo "Usage: ./svg2pdf.bash input.svg output.pdf" 1>&2
exit 1
fi
@CosminEugenDinu
CosminEugenDinu / install_libreoffice.sh
Created November 12, 2020 09:35
Install libreoffice on linux server
#!/usr/bin/env bash
sudo apt update
sudo apt install libreoffice --no-install-recommends
@CosminEugenDinu
CosminEugenDinu / How-to-install-mysql8-wsl2.md
Last active August 26, 2020 22:14
Shell script for installing MySql 8.x on WSL2 Ubuntu18.04

Install MySql 8.x on WSL2 Ubuntu18.04

(
git clone https://gist.github.com/CosminEugenDinu/7ef73816f950b1ba8a9fd1eabb23c42e install_mysql8
chmod 740 install_mysql8/wsl2-ubuntu18.04-mysql8.0.sh
./install_mysql8/wsl2-ubuntu18.04-mysql8.0.sh
)