Skip to content

Instantly share code, notes, and snippets.

🚴
Focusing

Romans Malinovskis romaninsh

🚴
Focusing
Block or report user

Report or block romaninsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Model_File.php
<?php
class Model_File extends LF_Model {
public $table = 'file';
public $storage = null;
public $local_copy = null;
function init(){
View Controller_Storage_S3
<?php
class Controller_Storage_S3 extends Controller_Storage {
public $useSSL = true;
public $endpoint = 's3-eu-west-1.amazonaws.com';
function connect(){
return new S3(
$this->app->getConfig('amazon/s3/Access_Key_ID'),
$this->app->getConfig('amazon/s3/Secret_Access_Key'),
View gist:10281987
select `article`.`id`,`article`.`image_id`,(select concat('/', `_f`.`dirname`, '/', `filestore_file`.`filename`) `url` from `filestore_file` left join `filestore_volume` as `_f` on `_f`.`id` = `filestore_file`.`filestore_volume_id` inner join `filestore_image` as `_f_3` on `_f_3`.`original_file_id` = `filestore_file`.`id` where `article`.`image_id` = `filestore_file`.`id` ) `image`,(select concat('/', `_f`.`dirname`, '/', `filestore_file`.`filename`) `url` from `filestore_file` left join `filestore_volume` as `_f` on `_f`.`id` = `filestore_file`.`filestore_volume_id` inner join `filestore_image` as `_f_3` on `_f_3`.`original_file_id` = `filestore_file`.`id` where `article`.`image_id` = `filestore_file`.`id` ) `image_4`,`article`.`show_photo_in_article`,`article`.`title`,`article`.`description`,`article`.`text`,`article`.`url_hash`,`article`.`date`,`article`.`time`,`article`.`meta_keywords`,`article`.`meta_description`,`article`.`news_of_the_day`,`article`.`is_published`,`article`.`is_archived`,`artic
View gist:11161018
node test2.js
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWWWWWWWWWWWWWWWWWWTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBBBBBBBBBBBBOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCCCCCCCCCCCCCCCCCCUUUUUUUUUUUUUUUUUUULLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRYYYYYYYYYYYYYYYGGGGGGGGGGGGGGGGDDDDDDDDDDDDDDDDDDDDDDFFFFFFFPPPPPPPPPPPPPPPPPPVVVXXKKKKKKKQJJ
View ATK4.3_Form.php
<?php
class Form_Register extends Form {
function init(){
parent::init();
$this->addField('Line','email')->validateNotNull();
$this->addField('Password','password')->validateNotNull();
$this->addSubmit('Register');
View gist:923cf73e442b88133b21
grant all on `exdash`.* to 'exdash'@'localhost' identified by '*********';
@romaninsh
romaninsh / gist:9ebdfb032dadbdb15dca
Created Jul 10, 2014
ATK4.3 default form submission handler syntax
View gist:9ebdfb032dadbdb15dca
$form->onSubmit(function($f){
$errors=[];
if($f['name'] != 'Joe') $errors[] = $f->error('You must be Joe');
if($f['surname'] != 'Blogs') $errors[] = $f->error('You must be Blogs');
if($errors) return $errors;
$f->update();
@romaninsh
romaninsh / gist:f6d8511ee193ad9d7830
Created Aug 29, 2014
Implementation of a tabbed crud page.
View gist:f6d8511ee193ad9d7830
<?php
class page_index extends Page {
public $title='Dashboard';
function init() {
parent::init();
$this->add('View_Box')
->setHTML('Welcome to your new Web App Project. Get started by opening '.
@romaninsh
romaninsh / gist:7835eef2c71c9ab4ee97
Created Mar 10, 2015
Password Strength Checker for Agile Toolkit 4.1
View gist:7835eef2c71c9ab4ee97
<?php
// Add into a field to perform password strength checking
class StrengthChecker extends HtmlElement {
public $default_text='use secure password';
function init(){
parent::init();
$this->set($this->default_text);
$this->addClass('password-checker');
You can’t perform that action at this time.