View MasterTrait.php
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 common\models; | |
trait MasterTrait | |
{ | |
public static function getDb() | |
{ | |
$connection = clone \Yii::$app->getDb(); | |
$connection->enableSlaves = false; | |
return $connection; |
View docker jscoverage
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
# JSCoverage | |
RUN cd /root/ \ | |
&& wget http://siliconforks.com/jscoverage/download/jscoverage-0.5.1.tar.bz2 \ | |
&& tar jxvf jscoverage-0.5.1.tar.bz2 \ | |
&& cd jscoverage-0.5.1/ \ | |
&& ./configure \ | |
&& make \ | |
&& make install |
View AcceptanceHelper.php
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 tests\codeception\common\_support; | |
use Codeception\Exception\ModuleException; | |
/** | |
* | |
*/ | |
class AcceptanceHelper extends \Codeception\Module |
View index.js
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
const chromeLauncher = require('chrome-launcher'); | |
const CDP = require('chrome-remote-interface'); | |
const atob = require('atob'); | |
const btoa = require('btoa'); | |
async function main() { | |
const chrome = await chromeLauncher.launch({ | |
chromeFlags: [ | |
'--window-size=1200,800', | |
'--user-data-dir=/tmp/chrome-testing', |
View bash
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
ss=$(ls -t ~/Desktop/*.* | head -n1) && tesseract $ss stdout |tr -d \\f|pbcopy |
View query.sql
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
SELECT count(t.ID) AS "completed tasks", | |
CAST(sum(c.NUMBERVALUE) AS unsigned integer) AS "story points", | |
coalesce(user.display_name, ASSIGNEE) AS display_name, | |
ASSIGNEE AS jiraname | |
FROM jira.jiraissue t | |
JOIN customfieldvalue AS c ON c.ISSUE = t.ID | |
AND c.CUSTOMFIELD = 10008 | |
JOIN customfieldvalue AS s ON s.ISSUE = t.ID | |
AND s.CUSTOMFIELD = 10000 | |
JOIN ao_60db71_sprint AS sprint ON sprint.ID = s.STRINGVALUE |
View query.sql
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
SET TIME ZONE 5; | |
SELECT | |
error_count, | |
date_added, | |
error_count - lag(error_count, 1) | |
OVER () delta, | |
avg(error_count) | |
OVER () average_count, | |
CASE WHEN error_count > avg(error_count) OVER () |
View python_m1.sh
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
#!/usr/bin/env zsh | |
mdir=${0:a:h} | |
/usr/bin/arch -x86_64 $mdir/python "$@" |
View docker-compose.yml
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
version: '3.6' | |
volumes: | |
zookeeper-data-0: | |
driver: local | |
zookeeper-log-0: | |
driver: local | |
kafka-data-0: | |
driver: local | |
services: | |
akhq: |
View Dockerfile
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
FROM gcc:bullseye AS builder | |
WORKDIR /root | |
RUN git clone https://github.com/edenhill/librdkafka.git | |
WORKDIR /root/librdkafka | |
RUN /root/librdkafka/configure --prefix=/root/librdkafka | |
RUN make | |
RUN make install | |
FROM python:3.10.5-bullseye |
OlderNewer