This file contains hidden or 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
image: php:7.4-fpm | |
pipelines: | |
default: | |
# Not needed unless you're doing feature tests. | |
# - step: | |
# name: Build | |
# image: node:8.9.4 | |
# caches: | |
# - node | |
# script: |
This file contains hidden or 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
protected function paginate($query) | |
{ | |
$paginate = $query->paginate($this->row_per_page, null, null, $this->page); | |
return [$paginate->toArray(), $paginate->render()->toHtml()]; | |
} |
This file contains hidden or 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
$text = '[IMG][img]https://i.imgur.com/hyj2oZBh.png[/img][/IMG] | |
[IMG][img]https://i.imgur.com/removed.png[/IMG][/img] | |
<iframe width="640" height="360" src="https://www.youtube.com/embed/HdYg2EPMKiI?rel=0" frameborder="0" allowfullscreen></iframe> | |
<iframe height="560" width="40" src="https://www.youtube.com/embed/Xt2lHsDZSYs?rel=0" frameborder="0" allowfullscreen></iframe> | |
<iframe src="https://www.verticalscope.com/"></iframe> | |
This is on a 2013 70s edition. I have a video of the problem on youtube if you search. [h]Should remove code without options too[/h]. [h=1]2013 VW Beetle DAB NOT WORKING![/h]'; | |
function cleanTheTextFirstSolution($text) | |
{ | |
return preg_replace( |
This file contains hidden or 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
<dependencies> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-web</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.projectlombok</groupId> | |
<artifactId>lombok</artifactId> | |
<optional>true</optional> |
This file contains hidden or 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
#!/usr/bin/env bash | |
! ( diff -y <(grep '.\=' ./.env.example |sort |sed -e 's/=.$//') <(grep '.\=' ./.env |sort |sed -e 's/=.$//') | grep " <") |
This file contains hidden or 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
$s3 = \Storage::disk('s3'); | |
$client = $s3->getDriver()->getAdapter()->getClient(); | |
$expiry = "+10 minutes"; | |
$command = $client->getCommand('GetObject', [ | |
'Bucket' => \Config::get('filesystems.disks.s3.bucket'), | |
'Key' => "file/in/s3/bucket" | |
]); | |
$request = $client->createPresignedRequest($command, $expiry); |
This file contains hidden or 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
$this->notificationService($device->device_token, $notification['target_screen'], $message['body'], $message['title']); | |
function notificationService($token, $targetScreen, $body = "", $title = "") | |
{ | |
$optionBuilder = new OptionsBuilder(); | |
$optionBuilder->setTimeToLive(60 * 20); | |
$optionBuilder->setCollapseKey('type_a'); | |
$optionBuilder->setContentAvailable(true); | |
try { | |
$optionBuilder->setPriority(OptionsPriorities::high); |
This file contains hidden or 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
function getBranch($belief_id){ | |
$con = DBINT::DBCon(); | |
$qry = "SELECT branch.idbranch, branch.branchname from worldviews inner join branch on branch.idbranch = worldviews.branchid where beliefid = ".$belief_id.' group by branchid'; | |
$stmt = $con->prepare($qry); | |
$stmt->execute(); | |
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC); | |
$r = $stmt->fetchAll(); | |
$con = null; |
This file contains hidden or 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
#!/bin/bash | |
# Basic configuration: datestamp e.g. YYYYMMDD | |
DATE=$(date +"%Y%m%d") | |
# Location of your backups (create the directory first!) | |
BACKUP_DIR="/home/backup/database" |
This file contains hidden or 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
server { | |
listen 185.13.231.188:500; | |
root /home/ftp_users/ftp/demo_core/public; | |
index index.php index.html index.htm; | |
server_name test.com; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
NewerOlder