Skip to content

Instantly share code, notes, and snippets.

View marcoandre1's full-sized avatar
✌️
Enjoy your day!

Marco E marcoandre1

✌️
Enjoy your day!
View GitHub Profile
@marcoandre1
marcoandre1 / 7-zip-powershell.md
Last active May 19, 2024 09:16
7-zip in powershell with scripts provided
@marcoandre1
marcoandre1 / SSH-configuration-github-gitlab.md
Last active May 12, 2024 18:56
Managing SSH keys for Github and Gitlab

Managing SSH keys for Github and Gitlab

NOTICE: This guide will help you set ssh keys for GitHub and GitLab. However, this is not going to change your commit user.name or user.email. If you need to change those for specific repositories, just run the following commands while in your repository:

git config user.name "Your Name Here"
git config user.email your@email.com

For more info, see this answer. Also, keep in mind this only changes the .git folder inside your repository which never gets added/committed/pushed/uploaded.

I recently had to manage two ssh keys (one for Github and one for Gitlab). I did some research to find the best solution. I am justing putting the pieces together here.

@marcoandre1
marcoandre1 / PyQt-installation.md
Last active August 11, 2023 12:55
Install PyQt with pip command on windows 10

About

Installation guide to PyQt4 and PyQt5 on windows 10. Works with Python 3.7.3 32-bit and Python 3.7.3 64-bit (tested)

Installing

  1. Verify that python is installed and runnning by typing python --version on the command line.
  2. Verify that you have not installed PyQt before pip list.
  3. pip install PyQt5 this will install PyQt5.
  4. pip install pyqt5-tools this will install the designer.exe in your Scripts folder.
@marcoandre1
marcoandre1 / add_comma_to_every_line_in_a_file.md
Last active December 4, 2022 22:55
Add comma to every line in a file with powershell script

From StackOverflow

$inputFile = Get-Content "C:\path\to\data.txt"
$outputFile = "C:\path\to\dataoutput.txt"

$collate = foreach($Obj in $inputFile) {       
    $begin = ""
    $end = ","
    $begin + $Obj + $end
@marcoandre1
marcoandre1 / Laravel.md
Last active November 26, 2022 21:25
Pluralsight Laravel tutorial notes

Getting Started wiht Laravel (PHP Framework) - The Basics

Setting up a project with Laravel

  1. PHP Environment Setup : Apache/Nginx, PHP, MySQL
  2. Download Composer : PHP Package Manager
  3. Install Laravel :

composer create-project --prefer-dist laravel/laravel FOLDER
example : composer create-project laravel/laravel getting-started
For more info, go to Laravel Documentation and follow the installation process.

@marcoandre1
marcoandre1 / Microsoft.PowerShell_profile.ps1
Last active September 25, 2020 22:10
Powershell configuration with Dracula theme (No admin access)
Import-Module PSReadLine
Set-Alias git hub
Set-PSReadLineOption -BellStyle None
Import-Module posh-git
Set-Location C:\users\<username>
# Dracula readline configuration. Requires version 2.0, if you have 1.2 convert to `Set-PSReadlineOption -TokenType`
Set-PSReadLineOption -TokenKind Command -ForegroundColor Green
Set-PSReadLineOption -TokenKind Parameter -ForegroundColor Gray
Set-PSReadLineOption -TokenKind Operator -ForegroundColor Magenta
Set-PSReadLineOption -TokenKind Variable -ForegroundColor White
@marcoandre1
marcoandre1 / SecuriteInformationRevision.md
Last active March 1, 2020 17:07
Révision de la sécurité de l'information

Séance 1


Pourquoi les enjeux de la sécurité sont-ils importants?

  • Évolution des technologies : de la sécurité de l'équipement à la sécurité de l'information
  • Ouverture sur le monde qui expose à plus de risques
  • Conséquences de plus en plus néfaste

Quel est l'objectif final de la sécurité de l'information? Qu'est-ce qu'on sécurise exactement?

/*============================================================================*/
/* Lesson 1: Create & query database objects */
/*============================================================================*/
/*Create a database*/
CREATE DATABASE TestData
GO
/*Switch the Query Editor connection to the TestData database*/
USE TestData
GO
/*Create the table*/
@marcoandre1
marcoandre1 / JoinSQLServer.md
Last active October 15, 2019 14:52
JOIN statement in SQL Server

From StackOverflow

<join_type> ::= 
    [ { INNER | { { LEFT | RIGHT | FULL } [ OUTER ] } } [ <join_hint> ] ]
    JOIN
  • If you just mention JOIN then by default it is a INNER JOIN.
  • An OUTER join has to be LEFT | RIGHT | FULL you can not simply say OUTER JOIN.

More info Write-Host

To stop script, simply press Ctrl + C

for (;;)
{
    [uint32] $num1 = Get-Random -Count 1 -InputObject (100..999)
    [uint32] $num2 = Get-Random -Count 1 -InputObject (100..999)
    [uint32] $num3 = Get-Random -Count 1 -InputObject (100..999)
    [uint32] $num4 = Get-Random -Count 1 -InputObject (100..999)