Skip to content

Instantly share code, notes, and snippets.

Avatar

Brahim Machkouri brahimmachkouri

View GitHub Profile
@brahimmachkouri
brahimmachkouri / move_files.sh
Last active Mar 27, 2021
move files in subfolder to the current folder
View move_files.sh
find ./ -type f -name "*.xls" -print0 | xargs -0 -I {} mv {} ./
View install_tools.sh
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
@brahimmachkouri
brahimmachkouri / latest.sh
Created Jul 3, 2020
Get the lastest version number of FogProject (or any Github Project)
View latest.sh
#!/bin/bash
githubproject="https://github.com/FOGProject/fogproject/releases/latest/"
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject)
version=${url##*/}
echo $version
View bureau_a_distance.rdp
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 Jan 8, 2020
setuserfta v1.7.1 - Passed - Package Tests Results
View FilesSnapshot.xml
<?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"
@brahimmachkouri
brahimmachkouri / fusion-version.ps1
Created Mar 18, 2019
Get the latest version of fusioninventory agent in Powershell
View fusion-version.ps1
$result = (Invoke-WebRequest –Uri "https://github.com/fusioninventory/fusioninventory-agent/releases/latest" -UseBasicParsing).BaseResponse.ResponseUri.AbsolutePath.Split('/')[-1]
@brahimmachkouri
brahimmachkouri / latest-fusion-agent.php
Last active Feb 26, 2019
Get the latest version of fusioninventory agent
View latest-fusion-agent.php
<?php
// BM 20190226
function get_links($link)
{
$result = "";
$ret = array();
/*** a new dom object ***/
$dom = new domDocument;
View OS X macOS Install ISO Creator
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations
View uninstall_ajenti.sh
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
DISTRO=
OS=
if grep 'Debian' /etc/issue > /dev/null 2>&1 ; then
@brahimmachkouri
brahimmachkouri / vagrant-uuids.sh
Last active Jun 24, 2017
This script displays vagrant index_uuid for each VM created with Vagrant (macOS)
View vagrant-uuids.sh
#!/bin/bash
vms=$(vagrant global-status | awk -F " " '{ print $5 }' | grep Users)
for vm in $vms
do
if [ -d "$vm" ]; then
cat $vm/.vagrant/machines/default/virtualbox/index_uuid
echo " $vm"
fi
done