func (u *UserRepository) ListUserName(ctx context.Context, req *repositories.ListUserRequest) ([]*models.UserModel, error) {
qb := squirrel.Select("username").From(u.tableName).PlaceholderFormat(PlaceHolder)
if req.Owner != "" {
if req.Owner != "root" {
qb = qb.Where(squirrel.Eq{"owner": req.Owner})
}
}
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
const { PlaywrightCrawler } = require("crawlee"); | |
const { firefoxUserPrefs } = require("./firefox-user-prefs"); // this just some firefox setting in this repo https://github.com/yokoffing/BetterFox | |
const constNike = require("./const"); | |
const currentDir = __dirname; | |
const path = require("path"); | |
const { firefox } = require("playwright"); | |
const { expect } = require("playwright/test"); | |
const imageFolder = path.join(currentDir, "images"); | |
const SimpleNodeLogger = require("simple-node-logger"); | |
const fs = require("fs"); |
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
<?php | |
use Box\Spout\Writer\Common\Creator\WriterEntityFactory; | |
function genLogs($progressCallback, $defaultHeader, $customHeader, $ipHeader = [], $model, $total) | |
{ | |
$headers = array_merge($defaultHeader, array_values($customHeader), $ipHeader); | |
$model = '\EMA\Model\MongoDB\\' . $model; | |
$tmpTableName = 'log_' . $this->uid . '_' . md5(rand()); |
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
<?php | |
public function showLoginForm(\Illuminate\Http\Request $request) | |
{ | |
$sso_url = env('SSO_URL', '#') . '?callback_url=' . action('Controller@loginSSO'); | |
return view('auth.login', ['sso_url' => $sso_url]); | |
} | |
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
<?php | |
$monitors = Monitor::doesntHave('uptimeRecords')->select('id', 'url')->limit(10)->get(); | |
$countMonitorsWithoutUTR = $monitors->count(); | |
if ($countMonitorsWithoutUTR < 10) { | |
$orderByDescUptimeRecord = UptimeRecord::select('id_monitor') | |
->selectRaw('MAX(checked_at) as max_checked_at') | |
->groupBy('id_monitor') | |
->orderBy('max_checked_at', 'asc') |
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
let terminal = new Terminal({ | |
cols: 128, | |
rows: 13, | |
convertEol: true, | |
cursorBlink: true, | |
}); | |
terminal.open(document.getElementById("terminal")); | |
let bearToken = | |
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Im9yaWdpbl91c2VybmFtZSI6IiIsInVzZXJuYW1lIjoicm9vdCJ9LCJpc3MiOiJzaW1wbGUtcGFuZWwiLCJzdWIiOiJhY2Nlc3MtdG9rZW4iLCJleHAiOjE2OTMzNTM2MDAsIm5iZiI6MTY5MzI3NTY2NSwiaWF0IjoxNjkzMjc1NjY1fQ.Jn6YSpW8F_GoUSXE-GtN-fgsEZXyy1Y5jjoe8vcuGzw"; | |
let protocol = location.protocol === "https:" ? "wss://" : "ws://"; |
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 () { | |
let terminal = new Terminal({ | |
screenKeys: true, | |
useStyle: true, | |
cursorBlink: true, | |
fullscreenWin: true, | |
maximizeWin: true, | |
screenReaderMode: true, | |
cols: 128, | |
}); |
A Pen by longvanren on CodePen.
NewerOlder