Skip to content

Instantly share code, notes, and snippets.

@delebash
delebash / install.sh
Created November 16, 2016 18:55 — forked from insane-dev/install.sh
Lemp stack for Ubuntu 16.04 (PHP7, Nginx, MySql, MongoDB, PhpMyAdmin, Git, Node.js, Bower, Gulp, Docker, Composer(with asset plugin), Dnsmasq)
#!/bin/bash
echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process."
read USERNAME
if [ -z "$USERNAME" ] ; then
echo "Exiting... Done."
exit
else
echo "Adding user to 'sudo' group..."
A little explanation for those who have no idea what NOBLOGREDIRECT is.
The define(‘NOBLOGREDIRECT’, ‘%siteurl%’); inside of the wp-config.php makes it so that when someone enters a subdomain that does not exist on your site to redirect to whatever url you wish it to. You can use this to have it either go to a specific FAQ page or directly back to the main root installation, anywhere you want to direct it. the %siteurl% can be replaced for example define(‘NOBLOGREDIRECT’, ‘http://frumph.net/FAQ/site-create’);
When someone in their browser tries to go to (for example) http://badsubdomain.frumph.net/ a subomain which doesn’t exist, it will go to what is defined in NOBLOGREDIRECT.
Without using NOBLOGREDIRECT the (for example) http://badsubdomain.frumph.net/ – which is a subdomain that doesn’t exist would direct to the signup page asking which reports whether or not the user can create the bad subdomain in question. This is fine, there’s nothing wrong with it redirecting to the signup page if someone put
@delebash
delebash / dexieDeleteAllDbs.js
Created September 19, 2021 01:06 — forked from skratchdot/dexieDeleteAllDbs.js
Delete all Dexie.js databases
Dexie.getDatabaseNames(function (names, cb) {
console.log('database names: ', names);
names.forEach(function (name) {
var db = new Dexie(name);
db.delete().then(function() {
console.log('Database successfully deleted: ', name);
}).catch(function (err) {
console.error('Could not delete database: ', name, err);
}).finally(function() {
console.log('Done. Now executing callback if passed.');
@delebash
delebash / AwesomeStruct.cpp
Created November 9, 2021 08:07 — forked from hanzochang/AwesomeStruct.cpp
[UE4(Unreal Engine 4)] Example for parsing json and creating struct instance from parsed json.
#include "ProcedualSpline.h"
#include "AwesomeStruct.h"
FAwesomeStruct FAwesomeStruct::BuildAwesomeStruct(
FVector AwesomeVector,
bool AwesomeBoolean,
float AwesomeFloat,
int32 AwesomeInteger,
FRotator AwesomeRotator
)
// MyClass.h ==============================
UClass *mBlueprintClass = nullptr;
// ==========================================
// MyClass.cpp ==============================
MyClass::MyClass()
{
static ConstructorHelpers::FObjectFinder<UBlueprint> blueprint_finder(TEXT("Blueprint'/Game/Path/To/Asset/MyBlueprint.MyBlueprint'")); // This path can be obtained from the editor doing right click + "Copy Reference"
if (blueprint_finder)
@delebash
delebash / UnrealGDAL_UE5.md
Created December 27, 2023 23:36 — forked from iwer/UnrealGDAL_UE5.md
A writeup of how to to get UnrealGDAL based projects up-and-running with Unreal Engine 5

UnrealGDAL based plugin setup

UnrealGDAL utilizes a python based cli tool to build thirdparty libraries with the Unreal toolchain and to include the build artifacts into the Unreal project build process. It is built around the conan C++ package manager.

There are several gotchas on the way to migrating the stack like: UE dependencies changing requiring conan recipe changes, conan upgrading to 2.0, ubuntu phasing out old autotools and so on...

As I understand, the original author of UnrealGDAL and the build-tools is quite busy, so I cloned relevant repositories and try to maintain something that is functioning for me.

However, maybe this can also be usefull to someone else, so here you go: