Skip to content

Instantly share code, notes, and snippets.

View xaoc-303's full-sized avatar

Andrey Novikov xaoc-303

View GitHub Profile
@xaoc-303
xaoc-303 / gist:d5f1acde4628d8d815ba42c4fb4b0555
Created October 16, 2018 16:59 — forked from mpenet/gist:5141349
playing with hayt api
{:drop-index :foo}
{:drop-keyspace :foo}
{:drop-table :foo}
{:select (#qbits.hayt.cql.CQLFn{:name COUNT, :args (:*)}), :from :foo}
{:select (:*), :from :foo, :where {:ts #qbits.hayt.cql.CQLFn{:name now, :args nil}}}
{:select (#qbits.hayt.cql.CQLFn{:name WRITETIME, :args (:bar)}), :from :foo}
{:select (#qbits.hayt.cql.CQLFn{:name TTL, :args (bar)}), :from :foo}
{:select (#qbits.hayt.cql.CQLFn{:name unixTimestampOf, :args (bar)} #qbits.hayt.cql.CQLFn{:name dateOf, :args (:bar)}), :from :foo}
{:select (:*), :from :foo, :where {#qbits.hayt.cql.CQLFn{:name token, :args (:user-id)} [#<core$_GT_ clojure.core$_GT_@6177060f> #qbits.hayt.cql.CQLFn{:name token, :args (tom)}]}}
{:select (:*), :from :foo, :where {:ts #qbits.hayt.cql.CQLFn{:name now, :args nil}}}
@xaoc-303
xaoc-303 / Dockerfile
Created May 22, 2016 01:21 — forked from Lewiscowles1986/Dockerfile
PhalconPHP 2.1 Vagrant & Docker for PHP7 build...
FROM ubuntu:16.04
RUN apt-get -y update && apt-get install -y php7.0-fpm php7.0-cli php7.0-curl php7.0-gd php7.0-intl php7.0-zip php7.0-pgsql build-essential git gcc make re2c libpcre3-dev php7.0-dev curl
RUN curl -sS http://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
RUN composer global require "phalcon/zephir:dev-master"
RUN mkdir -p /opt/www
<?php
class StatesControllerTest extends \Illuminate\Foundation\Testing\TestCase
{
public function createApplication()
{
$unitTesting = true;
$testEnvironment = 'testing';
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**
@xaoc-303
xaoc-303 / README.md
Last active August 29, 2015 14:18 — forked from hofmannsven/README.md
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
<?php
$request = <<<EOS
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://schemas.example.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<?php
// Composer: "fzaninotto/faker": "v1.3.0"
use Faker\Factory as Faker;
class PermissionsTableSeeder extends Seeder {
public function run() {
$faker = Faker::create('de_DE');

REQUIRE:

illuminate/html or laravelcollective/html

anahkiasen/underscore-php

laravelcollective/annotations

laravel/socialite

<?php
try
{
$user = Sentry::authenticate($credentials, false);
if ($user)
{
return Redirect::route('admin.pages.index');
}