Skip to content

Instantly share code, notes, and snippets.

keywords.select2({
tags: true,
createTag: function (params) {
var term = $.trim(params.term);
var count = 0
var existsVar = false;
//check if there is any option already
if($('#keywords option').length > 0){
$('#keywords option').each(function(){
if ($(this).text().toUpperCase() == term.toUpperCase()) {
$('#myModal1').hide()
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
$("div").removeClass("mfp-bg")
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.'%');
}
});
}
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.
<?php
namespace App\Http\Controllers;
use GuzzleHttp\Client;
class PostsAuthController extends Controller
{
//class variables
<?php
namespace App\Http\Controllers;
use GuzzleHttp\Client;
class PostsAuthController extends Controller
{
//class variables
private $sessionId;
public $curl;
public function __construct()
{
html, body{
min-height: 101% !important;
margin-right: 0px !important;
overflow-y: visible !important;
}
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
@waqasraza123
waqasraza123 / .htaccess
Created February 7, 2019 10:35
fix-page-not-found-on-reloading-angular
<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