This file contains 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 | |
class ThemosisValetDriver extends BasicValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
This file contains 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
# So, Microsoft made their Office suite dark-mode compatible, sort of. | |
# Thing is, it looks absolutely terrible and there is no simple way to turn it off. | |
# Oh wait, there is! Paste these commands in your terminal to excempt the app from Dark Mode in Mac OS. | |
defaults write com.microsoft.Excel NSRequiresAquaSystemAppearance -bool yes | |
defaults write com.microsoft.Word NSRequiresAquaSystemAppearance -bool yes | |
defaults write com.microsoft.Outlook NSRequiresAquaSystemAppearance -bool yes | |
defaults write com.microsoft.Powerpoint NSRequiresAquaSystemAppearance -bool yes |
This file contains 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
curl -O "http://s3.amazonaws.com/bearwithclaws.baconfile.com/hackermonthly-issue0[01-19].zip" |
This file contains 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
Validator::extend('at_least_one_filled', function($attribute, $value, $parameters, $validator) { | |
if (is_array($value)) { | |
$filteredArray = array_filter($value); | |
return count($filteredArray) > 0; | |
} else { | |
return !empty($value); | |
} | |
}); |
This file contains 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 | |
namespace App\Models; | |
use Crypt; | |
use Illuminate\Database\Eloquent\Model; | |
/** | |
* This model implements a custom cast named (en)crypt. If a property is added to | |
* the cast array with this type, the value will be automatically and transparently encrypted |
This file contains 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
# Put this before Vagrant.configure and you're good to go | |
def install_ansible_requirements | |
dir = File.dirname(File.expand_path(__FILE__)) | |
if (File.exist?("#{dir}/ansible/requirements.yml")) | |
system "ansible-galaxy install -r #{dir}/ansible/requirements.yml" | |
end | |
end | |
install_ansible_requirements |
This file contains 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
/** | |
* Toggle everything! | |
* | |
* Options | |
* | |
* data-toggle="<selector>" The element that should be toggled. | |
* data-toggle-class="<classname>" [optional] The classname that should be toggled on the target. If empty, display will be toggled | |
* data-toggle-alt-html="<content>" [optional] Alternate content that should be displayed in the toggling element | |
* data-toggle-duration="<duration>" [optional] Duration of the effect. Instant if empty. | |
* data-save-state="<reference>" [optional] Save the state of the toggle in a a cookie. Requires $.cookie |
This file contains 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
http_path = "/" | |
css_dir = "../css" | |
sass_dir = "./" | |
images_dir = "../images" | |
javascripts_dir = "../js" | |
environment = :production | |
relative_assets = true | |
output_style = (environment == :production) ? :compressed : :expanded | |
preferred_syntax = :scss |
This file contains 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 | |
for user in /var/cpanel/users/*; do | |
username=$(basename $user) | |
if [ -d /backup/cpbackup/daily/$username ] | |
then | |
if [ -d /backup/cpbackup/daily/$username/dnszones ] | |
then | |
for file in /backup/cpbackup/daily/$username/dnszones/*; do | |
cp $file /var/named/ | |
done |
This file contains 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 -n "yourpassword" | shasum | awk {'print $1'} | grep `cat /dev/stdin` combo_not.txt |
NewerOlder