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
import random | |
import pyautogui as pg | |
import time | |
# List of affectionate words | |
words = ('Love', 'Dear', 'Kiss Kiss') | |
# Delay to switch to the correct window | |
time.sleep(8) |
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
# To remove only some text on a content | |
@remove: //p[self::p/strong[contains(text(), "Articles liés")]] | |
@remove: //iframe[contains(@src,"https://urlsomething")] | |
# To deal with fucking error of <img> is not supported in blabla | |
@before_el(./..): //a/img | |
@before_el(./..): //p/img |
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
<template> | |
<div> | |
<el-card class="box-card"> | |
<div slot="header" class="clearfix"> | |
<span>Sells</span> | |
<router-link to="/dashboard/sells" class="float-right">Back</router-link> | |
</div> | |
<el-form ref="form" :model="form" label-width="120px" enctype="multipart/form-data"> | |
<table class="table table-bordered table-striped table-hover"> |
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 | |
namespace App\Http\Controllers; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use App\School; | |
use App\SchoolSemester; | |
use App\SemesterClass; |
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
@foreach (array_slice($posts->toArray(), 0, 5) as $post) | |
<h1>{{ $post['title'] }}</h1> | |
@endforeach |
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
$post = $request->all(); //Initialize the request | |
$test = DB::table('products') | |
->where('subcategory_id','=',$post['subcategory_id']); | |
if(isset($post['specification_id']) && !(isset($post['brand_id']))) | |
{ | |
$query = $query->where('subspecification_id','=',$post['specification_id']); | |
} | |
elseif(!(isset($post['specification_id'])) && isset($post['brand_id'])) | |
{ |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Image extends Model | |
{ | |
protected $fillable = ['name']; |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Attachment extends Model | |
{ | |
protected $guarded = []; | |
protected $appends = ['url']; |
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
/** | |
* Open all external links in a new window | |
*/ | |
jQuery(document).ready(function($) { | |
$('a').not('[href*="mailto:"]').each(function () { | |
var isInternalLink = new RegExp('/' + window.location.host + '/'); | |
if ( ! isInternalLink.test(this.href) ) { | |
$(this).attr('target', '_blank'); | |
} | |
}); |