This file contains hidden or 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
{ | |
"departures": { | |
"from": [ | |
{ | |
"code": "PNA", |
This file contains hidden or 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\Console\Commands; | |
use DB; | |
use Illuminate\Console\Command; | |
class ModelFactoryHelper extends Command | |
{ | |
/** |
This file contains hidden or 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
DB::enableQueryLog(); | |
... query ... | |
... query ... | |
... query ... | |
... query ... | |
dd(DB::getQueryLog()); |
This file contains hidden or 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
grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n | |
More info at http://www.inmotionhosting.com/support/email/exim/find-spam-script-location-with-exim |
This file contains hidden or 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
You must edit the file: | |
/var/cpanel/userdata/USERNAME/DOMAIN.COM | |
and change the line: | |
documentroot: /home/USERNAME/public_html | |
to | |
documentroot: /home/USERNAME/public_html/DOMAIN.COM |
This file contains hidden or 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/sh | |
FBCODE_ID='xxxxxxxxxx' | |
GACODE='xxxxxxxx' | |
FBBLOCK=$(cat <<EOF | |
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; |
This file contains hidden or 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/sh | |
# | |
# Add a Google Analytics tag to static website files | |
# @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages | |
# Tested on MacOS 10.8.X | |
# | |
# Usage: | |
# Set the GA parameters below | |
# Execute the script from the top-level of the static site | |
# |
This file contains hidden or 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
1. Make sure the ssh public key of your development is added to the live server. This way you won't need a passowrd. Test this by connecting to it directly ssh user@liveserver | |
2. Login to live server by `ssh user@liveserver` and create a new ssh key by `ssh-keygen`. MAKE SURE NOT TO INSERT A PASSWORD. | |
3. Add this public key to your bitbucket or github account that your repository is stored. | |
4. Make sure that the deploy.php script connects to git without https, for example = set('repository', '[email protected]:gdrakakis/checkout.git'); | |
5. Run dep deploy production -vvv to see exacty the running comands. | |
CPANEL users | |
--------------- | |
If you can't connect to your live server with ssh, make sure that the user can connect to the server with SSH. | |
To do this go to "Manage Shell Access" of WHM, select the user and assign him "Normal Shell*" |
This file contains hidden or 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
drush dl restws | |
drush en restws | |
drush role-add-perm 'anonymous user' 'access resource node' |
This file contains hidden or 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
clip < ~/.ssh/id_rsa.pub |