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
#!/usr/bin/env bash | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php -y | |
sudo apt-get update | |
sudo apt-get install curl -y | |
# PHP 7.4 installation steps | |
sudo apt-get install php7.4 -y |
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
<div> | |
<div class="w-full bg-teal-light shadow"> | |
<div class="container mx-auto"> | |
<div class="w-full flex justify-between items-center py-4 px-8 font-bold"> | |
<div class="text-center text-white">Company Name</div> | |
<div class="items-center hidden sm:flex"> | |
<a href="#" class="text-white hover:text-teal-lightest no-underline mx-2 px-2 py-2">Services</a> | |
<a href="#" class="text-white hover:text-teal-lightest no-underline mx-2 px-2 py-2">About Us</a> | |
<a href="#" class="bg-teal-dark hover:bg-teal-darker rounded-full text-white no-underline mx-2 px-4 py-2">Contact Us</a> | |
</div> |
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 | |
laravel new $1 | |
cd $1 | |
composer install | |
yarn install | |
touch README.md | |
cp .env.example .env | |
git init | |
git add -A |
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 artisan --help OR -h | |
php artisan --quiet OR -q | |
php artisan --version OR -V | |
php artisan --no-interaction OR -n | |
php artisan --ansi | |
php artisan --no-ansi | |
php artisan --env | |
// -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug | |
php artisan --verbose |
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 | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
cp src/redis-server /usr/local/bin | |
cp src/redis-cli /usr/local/bin | |
redis-server |
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
# Create configuration file for the new virtual host in `sites-available` folder | |
sudo cat <<EOF >/etc/apache2/sites-available/$1.conf | |
<VirtualHost $2:80> | |
DocumentRoot "/var/www/html/$1/" | |
ServerName $2 | |
<Directory "/var/www/html/$1/"> | |
allow from all | |
order allow,deny | |
# Enables .htaccess files for this site | |
AllowOverride All |
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 | |
//place this before any script you want to calculate time | |
$time_start = microtime(true); | |
//sample script | |
for($i=0; $i<1000; $i++){ | |
//do anything | |
} |
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
/* | |
Node.js, express, oauth example using Twitters API | |
Install Dependencies: | |
npm install express | |
npm install oauth | |
Create App File: | |
Save this file to app.js | |
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/sh | |
curl http://localhost:8080/solr/update/?commit=true -H 'Content-Type: text/xml' --data-binary '<update><delete><query>type:[content_type_name]</query></delete></update>' | |
single core: | |
curl http://localhost:8080/solr/update?commit=true -H "Content-Type: text/xml" --data-binary ':' | |
multiple core: | |
curl http://localhost:8080/solr/[CORE_NAME]/update?commit=true -H "Content-Type: text/xml" --data-binary ':' |
NewerOlder