Skip to content

Instantly share code, notes, and snippets.

View bilalinamdar's full-sized avatar

Bilal Inamdar bilalinamdar

View GitHub Profile
@chrisisbeef
chrisisbeef / best.ps1
Last active May 6, 2025 17:37
Bitdefender GravityZone Remote Installation Scripts (Works with JumpCloud Command-Runner Agent)
# Insert your company-hash here. When you get the download link, this is the long alpha-numeric scring
# that comes after setupdownloader_ in the filename.
# Do not include the square brackets (but do include the = if there is one).
$CompanyHash = ""
### Modify below this line at your own risk!
# If it's already installed, just do nothing
$Installed = Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" |
Where-Object { $_.DisplayName -eq "Bitdefender Endpoint Security Tools" }
@JanHolger
JanHolger / install-proxmox-s3-snippet-storage.sh
Created November 20, 2020 22:40
This script will install an s3 snippet storage server for ProxMox (cicustom) using Samba and MinIO
#!/bin/bash
echo "Password for Samba User 'snippets':"
read -s smb_password_snippets
echo "Password for S3 User 'admin':"
read -s s3_password_admin
echo "Password for S3 User 'dev' (min-length: 8):"
read -s s3_password_dev
echo "Password for S3 User 'api' (min-length: 8):"
read -s s3_password_api
wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
@martinsam16
martinsam16 / docker-wsl2.md
Last active April 30, 2025 22:28
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@bmaupin
bmaupin / free-database-hosting.md
Last active May 8, 2025 14:24
Free database hosting
@autoize
autoize / installNextCloud-ssl.sh
Last active February 4, 2022 17:42
NextCloud Install Script for Ubuntu 16.04, with automatic SSL by Let's Encrypt
#!/bin/bash
# NextCloud Installation Script for Ubuntu 16.04
# with SSL certificate provided by Let's Encrypt (letsencrypt.org)
# Author: Autoize (autoize.com)
nextcloud_url='https://example.com' # Full URL of NextCloud instance
letsencrypt_domains='-d example.com -d www.example.com' # Hostname(s) to obtain SSL certificate for, following -d flag
letsencrypt_email='[email protected]' # Admin contact email for Let's Encrypt
nextcloud_version='12.0.3' # Desired NextCloud version
@lodow
lodow / Json to mysql
Last active August 6, 2021 18:04
Script to import json to mysql in php
<?php
$content = json_decode(file_get_contents("filename.json")), true);
mysql_connect('localhost', 'user', 'pass');
mysql_select_db('db');
foreach($content as $item) {
$columns = implode(", ",array_keys($item));
$escaped_values = array_map('mysql_real_escape_string', array_values($item));
@wadewegner
wadewegner / addselftosqlsysadmin.cmd
Created January 25, 2012 18:35
Script to add the current user to the sysadmin role in SQL Server
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
@rubiojr
rubiojr / create_netdev.sh
Created November 15, 2011 12:47
Create raw disk, loop mount and serve via iscsi
#!/bin/sh
yum install -y qemu-img iscsi-initiator-utils scsi-target-utils.x86_64 qemu-img --nogpgcheck
mkdir /data
qemu-img create /data/netdisk01.raw 10G
losetup /dev/loop0 /data/netdisk01.raw
cp /etc/tgt/targets.conf /etc/tgt/targets.conf.bak
cat > /etc/tgt/targets.conf <<EOF
default-driver iscsi
<target iqn.2008-09.com.example:server.target1>
backing-store /dev/loop0
@hikoz
hikoz / dd.py
Created December 15, 2010 04:45
dd with progress in python
#!/usr/bin/env python
import sys
import time
import signal
from subprocess import Popen, PIPE
dd = Popen(['dd'] + sys.argv[1:], stderr=PIPE)
while dd.poll() is None:
time.sleep(.3)
dd.send_signal(signal.SIGUSR1)