Skip to content

Instantly share code, notes, and snippets.

Chaudhry Waqas waqasraza123

Block or report user

Report or block waqasraza123

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View proper-permissions-for-laravel
https://vijayasankarn.wordpress.com/2017/02/04/securely-setting-file-permissions-for-laravel-framework/
@waqasraza123
waqasraza123 / ssh-copy-id-not-working-permission-denied-publickey
Created Feb 21, 2019
ssh-copy-id-not-working-permission-denied-publickey
View ssh-copy-id-not-working-permission-denied-publickey
https://www.digitalocean.com/community/questions/ssh-copy-id-not-working-permission-denied-publickey
@waqasraza123
waqasraza123 / .htaccess
Created Feb 7, 2019
fix-page-not-found-on-reloading-angular
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
View How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
View background shifts when bootstrap modal is opened.css
html, body{
min-height: 101% !important;
margin-right: 0px !important;
overflow-y: visible !important;
}
View wordpress-api.php
<?php
namespace App\Http\Controllers;
use GuzzleHttp\Client;
class PostsAuthController extends Controller
{
//class variables
private $sessionId;
public $curl;
public function __construct()
{
View curl.php
<?php
namespace App\Http\Controllers;
use GuzzleHttp\Client;
class PostsAuthController extends Controller
{
//class variables
View ssh into digitalocean
BEFORE you try to SSH into server type:
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa where id_rsa is the file with your ssh key (this is the default version so chances are yours is the same. If not, change it.
ssh root@xxx.xxx.xxx and hopefully no password required Needed them to log on. (From Tutorial https://www.digitalocean.com/community/tutorials/how-to-connect-to-your-droplet-with-ssh)
I used gitbash for this.
View search using where clause and like condition for multiple keywords.php
if (isset($options['event_host'])) {
$query->join('event_hosts', 'events.id', '=', 'event_hosts.event_id')
->orWhere(function ($q) use ($options, $query){
foreach ($options['event_host'] as $e){
$query = $q->where('event_hosts.host_name', 'LIKE', '%'.$e.'%');
}
});
}
You can’t perform that action at this time.