Skip to content

Instantly share code, notes, and snippets.

@branneman
branneman / gist:951847
Last active January 27, 2021 18:42
array_find() - A case insensitive array_search() with partial matches
<?php
/**
* Case in-sensitive array_search() with partial matches
*
* @param string $needle The string to search for.
* @param array $haystack The array to search in.
*
* @author Bran van der Meer <[email protected]>
* @since 29-01-2010
*/
@timonweb
timonweb / gist:3165322
Created July 23, 2012 18:38
Code to catch all PHP errors which result in 500 Error Code. Include this snippet at the beginning of index.php file
<?php
define('E_FATAL', E_ERROR | E_USER_ERROR | E_PARSE | E_CORE_ERROR |
E_COMPILE_ERROR | E_RECOVERABLE_ERROR);
define('ENV', 'dev');
//Custom error handling vars
define('DISPLAY_ERRORS', TRUE);
define('ERROR_REPORTING', E_ALL | E_STRICT);
@ludoo0d0a
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :
#Admin login via ssh
> synobootseq --set-boot-done
> synobootseq --is-ready
#optional
> /usr/syno/etc/rc.d/S97apache-sys.sh start
> /usr/syno/etc/rc.d/S95sshd.sh start
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 16, 2024 03:47
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@czekaj
czekaj / Synology-find-too-long-filenames.sh
Created February 23, 2019 00:37
Synology NAS has filename limits for encrypted shares. If the name of a file has more than 143 characters it will fail the write operation. This short script will let you find all these files.
#!/bin/bash
find . -maxdepth 15 | perl -nle'print if m{\/[^\/]{143,}[^\/]}'
@mark05e
mark05e / apache-superset-on-windows10.md
Last active September 28, 2024 10:02
Installing Apache Superset on Windows 10

Installing Apache Superset on Windows 10

⚠️ WARN: This doc might be outdated. Use with caution. Only tested with Python v3.7

🙋‍♂️ INFO: If you have fixes/suggestions to for this doc, please comment below.

🌟 STAR: This doc if you found this document helpful.


@billyjbryant
billyjbryant / Synology NAS Boot Locked.md
Last active December 27, 2023 22:13 — forked from ludoo0d0a/gist:8d0cfd1cab22598cb5d8
Synology boot locked

Description:

Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :

Steps

  1. Install the syno-ready script to /usr/local/bin (You must be able to SSH to the NAS via an Admin user account)
wget https://gist.github.com/billyjbryant/993b4e8669659444006823a68f1bd509/raw/e728bfb2e9968f4c5a8ab7f7a9d316172267dc84/syno-ready
sudo mv syno-ready /usr/local/bin
sudo chmod +x /usr/local/bin/syno-ready