Skip to content

Instantly share code, notes, and snippets.

View lucasmaurice's full-sized avatar

Sonic lucasmaurice

View GitHub Profile
#!/bin/sh
chromium-browser --app=http://wm.etsmtl.ca:5000 --start-fullscreen
@lucasmaurice
lucasmaurice / header.java
Last active July 10, 2018 03:49
Java Class header for ETS.
/******************************************************
Course: LOG121
Session: E18
Group: 7
Project: ${PROJECT_NAME}
Students: Lucas Maurice; Raphael Duchaine; Jimmy Kong
Professor: Francis Cardinal
Purpose: TODO: Add Purpose
File Name: ${NAME}
Creation: ${DATE}
@lucasmaurice
lucasmaurice / install.md
Last active July 3, 2018 16:59
How to install Cuda on Ubuntu 18.04

Instructions for install Cuda on Ubuntu 18.04

1. Update repository and install drivers

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall

2. Reboot your computer

<?php
echo "<p>Hello World</p>";
$param = "123";
$command = escapeshellcmd("python3 ./test.py ".$param);
$output = shell_exec($command);
echo $output;
@lucasmaurice
lucasmaurice / CTF Cheat Sheet.md
Last active April 22, 2024 10:44
A Cheat Sheet for CTF.

Sysadmin CTF Cheat Sheet

SYSADMIN

STEPS

  • bash history

  • Check Home folder and inspect files

function FindProxyForURL(url, host) {
// If the hostname matches, use proxy.
if (
shExpMatch(host, "*.home") ||
shExpMatch(host, "192.168.1.*")
) {
return "SOCKS localhost:8080";
}
@lucasmaurice
lucasmaurice / cloudinit.yml
Last active August 13, 2020 19:57
Rancher2 Cloud Init
#cloud-config
#
# This is an example file to automatically configure resolv.conf when the
# instance boots for the first time.
#
# Ensure that your yaml is valid and pass this as user-data when starting
# the instance. Also be sure that your cloud.cfg file includes this
# configuration module in the appropriate section.
#
manage_resolv_conf: true
@lucasmaurice
lucasmaurice / Readme.md
Last active April 27, 2021 18:08
CentOS Disable IPv6.

Run this:

bash <(curl -s https://gist.github.com/lucasmaurice/ba2b0e72963683a5e395ff2ed20a8825/raw/987bb7f87749ffe1d05e7e0db4f6d4910c2d8a65/disable-ipv6.sh)
@lucasmaurice
lucasmaurice / autoextend-rootfs.sh
Last active March 27, 2023 18:29
Bash script that extend the root filesystem non-interactively and without rebooting the system.
# Get the root filesystem
FS_TYPE=$(df -T / | grep -v Filesystem | awk '{print $2}')
FS_DEVICE=$(df -T / | grep -v Filesystem | awk '{print $1}')
# Get VG and LV from the root filesystem
VG=$(lvdisplay $FS_DEVICE | grep "VG Name" | awk '{print $3}')
# Get the disk and partition number
DISK=$(pvs | grep $VG | awk '{print $1}' | rev | cut -d/ -f1 | rev | sed 's/[0-9]*//g')
PART=$(pvs | grep $VG | awk '{print $1}' | rev | cut -d/ -f1 | rev | sed 's/^[^0-9]*//')
@lucasmaurice
lucasmaurice / README.md
Last active May 26, 2023 14:44
Paste to keyboard with Auto Hotkey v1: https://www.autohotkey.com/

This script allow you to send from keyboard the content of the clipboard.

The current config will type the content of the clipboard when CTRL+K is pressed.