Skip to content

Instantly share code, notes, and snippets.

View azimidev's full-sized avatar
:octocat:
Pro

Azimi azimidev

:octocat:
Pro
View GitHub Profile
@azimidev
azimidev / reload.html
Created October 11, 2015 21:43
This script is used for gulp-reload in your index.html file for reload the page automatically
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@azimidev
azimidev / commandline
Last active May 21, 2016 14:08
Simple PHP and Python Web Server
php -S localhost:8888
[OR]
open http://localhost:8000 && python -m SimpleHTTPServer
@azimidev
azimidev / prepare_laravel_for_shared_hosting
Created December 13, 2015 00:59
Shell script to prepare Laravel for shared hosting
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
@azimidev
azimidev / disposable_email_addresses
Last active December 22, 2022 06:51
Notify me of any update
0815.ru
0815.ru0clickemail.com
0815.ry
0815.su
0845.ru
0clickemail.com
0-mail.com
0wnd.net
0wnd.org
10mail.com
@azimidev
azimidev / .htaccess
Last active June 19, 2016 22:02
Parsclick htaccess
<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
ErrorDocument 400 /400
ErrorDocument 403 /403
ErrorDocument 404 /404
ErrorDocument 500 /500
<IfModule mod_rewrite.c>
@azimidev
azimidev / _Laravel_Queue_Supervisor_Instruction.md
Last active November 15, 2022 14:42 — forked from danharper/a.md
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.

In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.

@azimidev
azimidev / Human-Height-Array.php
Last active March 18, 2017 21:46
Human height to use in array format with key as CM and value as foot
'91' => "3' 6\"",
'94' => "3' 1\"",
'97' => "3' 2\"",
'99' => "3' 3\"",
'102' => "3' 4\"",
'104' => "3' 5\"",
'107' => "3' 6\"",
'109' => "3' 7\"",
'112' => "3' 8\"",
'114' => "3' 9\"",
@azimidev
azimidev / Contract Killer.md
Last active April 13, 2017 02:21
The latest version of my ‘killer contract’ for web designers and developers

Between [company name]

And [customer name].

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

So in short;

@azimidev
azimidev / Repair Disk Permission.md
Created April 13, 2017 01:47
Repair Disk Permission Mac

Verify:

sudo /usr/libexec/repair_packages --verify --standard-pkgs /

Repair:

sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /

@azimidev
azimidev / zodiac.php
Last active November 27, 2017 18:06
find zodiac from a SQL like birthday date
<?php
function zodiac($birthday)
{
$zodiac = '';
[$year, $month, $day] = explode ('-', $birthday);
if ( ( $month == 3 && $day > 20 ) || ( $month == 4 && $day < 20 ) ) { $zodiac = 'Aries'; }
elseif ( ( $month == 4 && $day > 19 ) || ( $month == 5 && $day < 21 ) ) { $zodiac = 'Taurus'; }
elseif ( ( $month == 5 && $day > 20 ) || ( $month == 6 && $day < 21 ) ) { $zodiac = 'Gemini'; }
elseif ( ( $month == 6 && $day > 20 ) || ( $month == 7 && $day < 23 ) ) { $zodiac = 'Cancer'; }