Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
brahimmachkouri / gen_autosigned_certificate.sh
Created February 14, 2022 13:30
Generate a self signed certificate without asking a passphrase for the private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 5000 -nodes
@brahimmachkouri
brahimmachkouri / install_node.sh
Created February 13, 2022 18:00
Node.js installation
#!/bin/bash
# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs
@brahimmachkouri
brahimmachkouri / gist:530b67f38f39fba52c8309abbaf080fa
Created November 9, 2021 11:19 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@brahimmachkouri
brahimmachkouri / show_leases.py
Last active August 18, 2023 08:25
Show actual dhcp leases
#!/usr/bin/python
import datetime, bisect
def parse_timestamp(raw_str):
tokens = raw_str.split()
if len(tokens) == 1:
if tokens[0].lower() == 'never':
return 'never';
@brahimmachkouri
brahimmachkouri / uqload.sh
Last active December 31, 2022 20:53
Download uqload video with youtube-dl
#!/bin/bash
# usage : uqload.sh "direct_url"
youtube-dl --referer "https://uqload.com" --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0" $1
@brahimmachkouri
brahimmachkouri / move_files.sh
Last active March 27, 2021 11:13
move files in subfolder to the current folder
find ./ -type f -name "*.xls" -print0 | xargs -0 -I {} mv {} ./
@brahimmachkouri
brahimmachkouri / install_tools.sh
Created October 27, 2020 17:04 — forked from allenyllee/install_tools.sh
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
@brahimmachkouri
brahimmachkouri / fog-latest.sh
Last active February 14, 2022 13:32
Get the lastest version number of FogProject (or any Github Project)
#!/bin/bash
githubproject="https://github.com/FOGProject/fogproject/releases/latest/"
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject)
version=${url##*/}
echo $version
screen mode id:i:2
use multimon:i:0
desktopwidth:i:1680
desktopheight:i:1050
session bpp:i:32
winposstr:s:0,1,880,107,1680,707
compression:i:1
keyboardhook:i:2
audiocapturemode:i:0
videoplaybackmode:i:1
@brahimmachkouri
brahimmachkouri / FilesSnapshot.xml
Created January 8, 2020 18:00
setuserfta v1.7.1 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\setuserfta\setuserfta.nupkg" checksum="89CC7893D63C1EBB7C197C96F92DB706" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\setuserfta.nuspec" checksum="89839B7401F25F411F211FDE27A68D46" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\SetUserFTA.zip.txt" checksum="800F22077EB541F743EBAE8C49647854" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\tools\chocolateyInstall.ps1" checksum="E47D4E57864F5C479884AD819CDBE6EA" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\tools\EULA.txt" checksum="E8BB21C92A8C13EFA572DC3B2AC5F538" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\tools\SetUserFTA\EULA.txt" checksum="E8BB21C92A8C13EFA572DC3B2AC5F538" />
<file path="C:\ProgramData\chocolatey\lib\setuserfta\tools\SetUserFTA\SetUserFTA - the kolbicz blog.url"