Skip to content

Instantly share code, notes, and snippets.

View D4R4's full-sized avatar

Dara Ardalan D4R4

  • SCALINX
  • Paris, France
View GitHub Profile
@D4R4
D4R4 / boss_sindragosa.cpp
Last active September 5, 2019 07:59
Syndragosa fix for IceTombs
diff -r 5a94d526dd3a src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp Mon Feb 09 10:51:06 2015 +0330
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp Wed Feb 11 21:22:36 2015 +0330
@@ -188,9 +188,36 @@
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/)
{
+
+ //start custom code ** create GOs in place of the IceTomb NPC
+ std::list<Creature*> IceTombList;
@D4R4
D4R4 / boss_the_lich_king.cpp
Last active September 5, 2019 08:01
Don't let grabbed players make Defile bigger
diff -r 5a94d526dd3a src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp Mon Feb 09 10:51:06 2015 +0330
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp Thu Feb 12 15:42:01 2015 +0330
@@ -2848,6 +2848,7 @@
void CorrectRange(std::list<WorldObject*>& targets)
{
targets.remove_if(ExactDistanceCheck(GetCaster(), 10.0f * GetCaster()->GetObjectScale()));
+ targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_HARVEST_SOUL_VALKYR));
}
@D4R4
D4R4 / regex_select
Created January 30, 2019 09:00
Regex to select between apostrophe and quotation marks, Great to automate translating combined with Qtranslate and MacroRecorder
(?<=[ ](["']\b))(?:(?=(\\?))\2.)*?(?=\1)
@D4R4
D4R4 / faraso_cron.php
Last active September 5, 2019 07:58
Cronjob to sync domain pricing in WHMCS with Faraso.org resellers prices, Just correct the configuration and add it to a daily cron schedule
<?php
$profit = 0;
$irt = true;
$ir_r = 10000;
$ir_t = 10000;
$ir_n = 10000;
include "../public_html/configuration.php";
@D4R4
D4R4 / Prevent automatic streaming of MP4 files in Nginx
Created February 7, 2019 06:13
It should probably be placed before the "location /" part of the configuration, also remember to clear cache
location ~ ^.*/(?P<request_basename>[^/]+\.(mp4))$ {
add_header Content-Disposition 'attachment; filename="$request_basename"';
}
@D4R4
D4R4 / load up vsftpd virtual user database
Created February 7, 2019 06:16
Loads up and updates vsftpd virtual user database, requires to restart the vsftpd service to take effect
db_load -T -t hash -f /etc/vsftpd/virtual_users /etc/vsftpd/virtual_users.db
@D4R4
D4R4 / Resize a Linux filesystem without LVM
Last active February 26, 2019 09:38
must be the last partition on disk, this is usefull for those huge non-lvm virtual machines that you add storage to later on
1. boot up a linux live if you want to resize the root partition
2. follow below:
Run fdisk on the right disk (X is the correct letter of your disk): fdisk /dev/sdX
Check the partition table by pressing p (to view partition details)
Delete the partition by pressing d (to delete the partition)
Select the right partition that you want to delete, in most cases will be the only on the disk, so press 1 (to select the partition)
Create a new partition by pressing n (to create a new partition) and select the partition type whether Primary (by pressing p) and the right number
Get the first block from the partition details in point 2
Press enter to accept the default as the last block.
Check the partition table by pressing p (to list the partition and confirm)
@D4R4
D4R4 / ssacli to configre HPE Raid Controller from inside the host OS
Created February 7, 2019 13:35
Can convert raid 0 to 1 and 10 live without downtime
Show configuration
ESXi 5.5 -> /opt/hp/hpssacli/bin/hpssacli ctrl all show config
ESXi 6.5 -> /opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show config
Controller status
ESXi 5.5 -> /opt/hp/hpssacli/bin/hpssacli ctrl all show status
ESXi 6.5 -> /opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show status
Show detailed controller information for all controllers
ESXi 5.5 -> /opt/hp/hpssacli/bin/hpssacli ctrl all show detail
@D4R4
D4R4 / allow services and ports in firewalld
Last active February 16, 2019 10:07
Usefull for RHEL 7 and up
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --zone=public --permanent --add-port=5000/tcp
firewall-cmd --reload
@D4R4
D4R4 / yummy yums
Last active February 16, 2019 18:41
handy bunch of tools for CentOS
epel-release
wget nano htop nload mc net-tools screen iperf3