Skip to content

Instantly share code, notes, and snippets.

View DarkSide666's full-sized avatar

Imants Horsts DarkSide666

  • DS Development
  • Riga, Latvia
View GitHub Profile
@abbadon1334
abbadon1334 / benchmark_loops.php
Created February 21, 2019 08:57
benchmark of some loops in php
<?php
$a = function($array) {
$ret = [];
foreach($array as $item)
{
$ret[] = $item;
}
return $ret;
@xCONFLiCTiONx
xCONFLiCTiONx / Notepad2.ini
Last active May 18, 2023 13:55
Notepad2 VSCode Dark Theme (import)
##above is your settings##
[Custom Colors]
01=#000000
02=#0A246A
03=#3A6EA5
04=#52A5F8
05=#0D8206
06=#608020
07=#648000
08=#A46000
@romaninsh
romaninsh / Model_File.php
Last active February 19, 2016 13:06
FileStore for ATK (version 2.0) draft - You will need https://github.com/blueimp/jQuery-File-Upload and tpyo/amazon-s3-php-class
<?php
class Model_File extends LF_Model {
public $table = 'file';
public $storage = null;
public $local_copy = null;
function init(){
@romaninsh
romaninsh / How to use on a page.php
Last active March 14, 2016 00:12
Model Union implementation in Agile Toolkit (draft version)
<?php
$tt->addTab('Debtor Report Level 1')->add('Grid')->setModel('Model_Report_Debtors',['contractor_id','amount','amount_sum'])->groupBy('contractor_id')
->owner->removeColumn('amount');//->addCondition('contractor_id','217716');
$tt->addTab('Debtor Report Drilldown on 217717 ')->add('Grid')->setModel('Model_Report_Debtors',['contractor_id','amount'])->addCondition('contractor_id','217717');
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active March 6, 2024 22:48 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);