Skip to content

Instantly share code, notes, and snippets.

@gorlovka
gorlovka / redis_cheatsheet.bash
Created February 21, 2018 06:59 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@gorlovka
gorlovka / user-actions.js
Created June 5, 2017 06:10 — forked from rupl/user-actions.js
A CasperJS script to demonstrate simple user navigation actions on a website. This sample accompanies a blog post about CasperJS found at http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
/**
* @file
* Simulating user actions with CasperJS. This script explores the ability to
* use Casper for navigation just like a user would: clicking the page and
* entering text to submit a form. This script accompanies a blog post from
* Four Kitchens:
*
* @see http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
*/
@gorlovka
gorlovka / random-record-from-model.php
Created November 10, 2016 06:44 — forked from vyspiansky/random-record-from-model.php
Yii: how can I get random values from model
<?php
// Source: http://goo.gl/NOCJKM
$max = Table::model()->count(array(
'condition' => 'status<:status',
'params' => array('status' => Table::STATUS_A)
));
// Should query min value too