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
export {} | |
declare global { | |
interface Date { | |
addDays(days: number, useThis?: boolean): Date; | |
isToday(): boolean; | |
clone(): Date; | |
isAnotherMonth(date: Date): boolean; | |
isWeekend(): boolean; | |
isSameDate(date: Date): boolean; |
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
input | |
plen(17); | |
fast(0.666); | |
slow(0645); | |
var | |
mTrueRange : float; | |
Oval : Float; | |
Hval : Float; |
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
# SQL Server Command Line Tools - custom image | |
# From Alpine 3.11 (~5 MBs) | |
FROM alpine:3.11 | |
LABEL maintainer="@dbamastery" | |
# Installing system utilities | |
RUN apk add --no-cache curl gnupg | |
# Adding custom MS repository for mssql-tools and msodbcsql | |
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk |
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 Axelvkn\AppBundle\Filter; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface; | |
use ApiPlatform\Core\Exception\InvalidArgumentException; | |
use Doctrine\ORM\QueryBuilder; | |
class OrSearchFilter extends SearchFilter |
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 | |
declare(strict_types=1); | |
namespace App\Filter; | |
use ApiPlatform\Core\Bridge\Doctrine\Common\Filter\OrderFilterTrait; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter as BaseOrderFilter; | |
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface; | |
use Doctrine\Common\Persistence\ManagerRegistry; |
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 | |
/** | |
* Split PDF file | |
* | |
* <p>Split all of the pages from a larger PDF files into | |
* single-page PDF files.</p> | |
* | |
* @package FPDF required http://www.fpdf.org/ | |
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/ |
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 UIKit | |
public extension UIDevice { | |
var modelName: String { | |
var systemInfo = utsname() | |
uname(&systemInfo) | |
let machineMirror = Mirror(reflecting: systemInfo.machine) | |
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
// MARK: - Adding a header to a single request | |
let headers: HTTPHeaders = [ | |
"X-Mashape-Key": MY_API_KEY, | |
"Accept": "application/json" | |
] | |
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers) | |
.responseJSON { response in | |
debugPrint(response) |