This is a collection of notes, mods and servers stuff for Team Fortress 2
Useful notes for making the game nicer to play.
<?php | |
/* SWITCH USER ACCOUNTS */ | |
public function getChangeAccount($id) | |
{ | |
if(Session::has('old_id')) | |
if($id != Session::get('old_id')) | |
{ | |
Session::forget('old_id'); | |
if(Session::has('old_email')) | |
Session::forget('old_email'); |
# START - QUEUE | |
# Function: _queue_command | |
# Description: Adds a command to the Redis command queue with an optional schedule. | |
# Parameters: | |
# $1: The command to be added to the queue. Example "echo Hello, World!" | |
# $2: (Optional) The schedule for the command ("2023-06-30 12:00:00"). Default is "now". | |
# Returns: None | |
_queue_command() { |
#!/bin/bash | |
# Get current year and month | |
year=$(date +%Y) | |
month=$(date +%m) | |
# Print month and year | |
echo "$(date +%B\ %Y)" | |
# Print the days of the week |
// Prompt for openAI's ChatGPT: Make python script for windows to upload given folder to ssh | |
import os | |
import paramiko | |
local_path = r'C:\path\to\folder' | |
remote_path = '/path/on/remote/server' | |
hostname = 'remote.server.com' | |
username = 'your_username' | |
password = 'your_password' |
> ping abc.xoren.io
for server ip
#!/bin/bash | |
##HOMES=$(getent passwd) | |
HOMES=$(sudo getent passwd | awk -F ":" '$7 == "/bin/bash" && $3 >= 2000 {print $1":"$6}') | |
for i in ${HOMES}; do | |
ARR=(${i//:/ }) | |
NAME=${ARR[0]} | |
HOME=${ARR[1]} |
#!/bin/bash | |
echo"" | |
read -p "Changing php Which version? #1:5.6 | #2:7.0 | #3:7.1 | #4:7.2 ?" -n 1 -r && echo "" | |
if [[ $REPLY =~ ^[1]$ ]]; then | |
update-alternatives --set php /usr/bin/php5.6 | |
echo 'Now your cli env is 5.6' | |
elif [[ $REPLY =~ ^[2]$ ]]; then | |
update-alternatives --set php /usr/bin/php7.0 | |
echo 'Now your cli env is 7.0' |
@echo off | |
( | |
echo hello | |
) | clip |
#!/bin/bash | |
UPDATES=$(LANG=C apt-get upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1); | |
if [ $UPDATES -lt 0 ]; then | |
reboot | |
else | |
echo "yay you finally updated"; | |
fi |