This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (c) Lennies.IT 2018 | |
# | |
info() { | |
echo "--- $1 ---" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright: Lennart van den Dool <lennartvdd at gmail dot com> | |
# All rights reserved. | |
# License: FreeBSD | |
# Settings | |
# ---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET computer=\\COMPUTERNAME | |
REM sc %computer% config remoteregistry start= manual | |
REM sc %computer% start remoteregistry | |
REM psexec %computer% net start RemoteRegistry | |
psexec %computer% reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0 | |
psexec %computer% netsh advfirewall firewall set service remoteadmin enable | |
psexec %computer% netsh advfirewall firewall set service remotedesktop enable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Author: Lennart van den Dool | |
Date: 2017-03-10 | |
Purpose: Query Builder categorize objects by dimension (assuming cubiods) | |
If you run this script in the command line it will output some SQL that might help you get what you want. | |
This assumes the cuboid rotation is limited to the 6 permutations of l x b x h . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//config | |
$accessToken = ""; | |
$url = "https://app.asana.com/api/1.0/users/me"; | |
//script | |
$headers = [ | |
"Authorization: Bearer $accessToken", | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Modify variables as required | |
$srcFolder = "in" | |
$destFolder = "out" | |
Get-ChildItem -File $srcFolder | ForEach-Object { | |
$newFile = $destFolder + "\$(Get-Random)-$($_.Name).jpg" | |
Copy-Item $_.FullName $newFile | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be a root user to run this script." 2>&1 | |
exit 1 | |
fi | |
find /etc/iscsi/ -type f | xargs grep -l "startup\s*=\s*manual" | xargs sed -i 's/\(startup\s*=\s*\)manual/\1automatic/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script does the following things | |
# - update apt respositories | |
# - Install: | |
# - nginx | |
# - git | |
# - Create a GIT User | |
# - Set up GIT bare repo | |
# - Set up GIT working directories for nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: ~/.ssh/environment should not be used, as it | |
# already has a different purpose in SSH. | |
env=~/.ssh/agent.env | |
# Note: Don't bother checking SSH_AGENT_PID. It's not used | |
# by SSH itself, and it might even be incorrect | |
# (for example, when using agent-forwarding over SSH). | |
agent_is_running() { |
NewerOlder