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/bash | |
# Update package lists | |
sudo apt update | |
# Install zsh | |
sudo apt install -y zsh | |
# Install Oh My Zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
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
alias ..="cd .." | |
alias ...="cd ../.." | |
alias h='cd ~' | |
alias c='clear' | |
alias art=artisan | |
alias codecept='vendor/bin/codecept' | |
alias phpspec='vendor/bin/phpspec' | |
alias phpunit='vendor/bin/phpunit' |
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
cd /usr/src/ | |
git clone https://github.com/expressif/pecl-event-libevent.git | |
cd pecl-event-libevent | |
phpize | |
./configure | |
make && sudo make install | |
sudo apt update | |
sudo apt install php7.4-dev libevent-dev |
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 | |
#Refer https://cmanios.wordpress.com/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line/ | |
# store start date to a variable | |
imeron=`date` | |
echo "Import started: OK" | |
dumpfile="/home/bob/bobiras.sql" | |
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
var Elixir = require('laravel-elixir'); | |
var gulp = require('gulp'); | |
var gulpif = require('gulp-if'); | |
var react = require('gulp-react'); | |
var concat = require('gulp-concat'); | |
var Task = Elixir.Task; | |
Elixir.extend('jsx', function (src, dest) { | |
src = src || 'resources/assets/jsx/!*.jsx'; | |
dest = dest || 'public/js'; |
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/bash | |
echo "--------------------------------------------------------------------------------------------" | |
echo "Installing Predis on Ubuntu 18.04" | |
echo "Read more: https://github.com/nrk/predis" | |
echo "Author: Ralf Rottmann | @ralf | http://rottmann.net" | |
echo "--------------------------------------------------------------------------------------------" | |
PHP_CONF_DIR="/etc/php/7.3/apache2/conf.d" | |
echo "Checking prerequisites..." | |
echo "Git available?" | |
[ ! -s /usr/bin/git ] && sudo apt-get -q -y install git || echo "Git already installed." |
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
* -A in SSH enables agent forwarding. | |
* -p 2122 is not needed if you use the default port of 22. | |
* Replace SSH_USER and example.com with your own values. | |
* Example run: $ envoy run deploy_demo | |
* --no-scripts because Laravel composer.json's post-install-cmd includes optimize, which is already done by php artisan dump-autoload | |
@servers(['test' => '-A -p 2122 -l user test.example.com', 'prod' => '-A -p 2122 -l user example.com']) | |
@task('install_test', ['on' => ['test']]) | |
cd project |
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
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk. | |
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config) | |
# -------------------------------- Commands ------------------------------------ | |
# Use "commands" key to execute commands on the EC2 instance. The commands are | |
# processed in alphabetical order by name, and they run before the application | |
# and web server are set up and the application version file is extracted. | |
# ------------------------------------------------------------------------------ | |
commands: | |
01updateComposer: |
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
/* | |
MSSQL | |
----- | |
Rebuilds indexes on smallest tables first, allowing the maximum number of indexes to be rebuilt in the shortest amount of time. | |
Real time progress updates, allowing you to estimate how much time is remaining before completion. | |
Correctly handles multiple schemas, a common flaw in other scripts. | |
*/ | |
SET NOCOUNT ON | |
GO | |
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 | |
/* | |
Contact 7 form - load js, css only needed pages | |
*/ | |
add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 100 ); | |
function deregister_cf7_javascript() { | |
if ( !is_page(array(8, 10)) ) { | |
wp_deregister_script( 'contact-form-7' ); | |
} |
NewerOlder