php artisan queue:work --tries=1
> for($i = 1; $i <= 10; $i++) Bus::dispatch(new App\Jobs\TestRetry());
#!/bin/bash | |
# Check the current status of natural scrolling | |
current_status=$(defaults read -g com.apple.swipescrolldirection) | |
# Toggle the natural scrolling setting | |
if [ "$current_status" -eq 0 ]; then | |
defaults write -g com.apple.swipescrolldirection -bool true | |
echo "Natural scrolling enabled." | |
else |
🔥<Topic> Tip: Get Audience Attention | |
Actual Tip | |
[If more characters left] How it will be helpful | |
Attach Image with Examples explaing the Tip | |
[Linked Thread] | |
How the tip will be helpful |
<?php | |
use Illuminate\Database\Eloquent\Relations\Relation; | |
use ReflectionClass; | |
use ReflectionMethod; | |
use ReflectionType; | |
trait RelationAware | |
{ | |
/** |
/** | |
* Get Client Public IP Address | |
* @return type | |
*/ | |
function getIp(){ | |
$clientIp = null; | |
foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key){ | |
if (array_key_exists($key, $_SERVER) === true){ | |
foreach (explode(',', $_SERVER[$key]) as $ip){ | |
$ip = trim($ip); // just to be safe |
function parseArguments() | |
{ | |
array_shift($argv); | |
$out = array(); | |
foreach($argv as $arg) | |
{ | |
if(substr($arg, 0, 2) == '--') | |
{ | |
$eqPos = strpos($arg, '='); | |
if($eqPos === false) |