Skip to content

Instantly share code, notes, and snippets.

common/
composer/
deploy/
fail2ban/
ferm/
hhvm/
mariadb/
memcached/
nginx/
php/
- name: Run npm install - for sage
command: npm install
connection: local
args:
chdir: "/vagrant-nfs-workspace/{{ project.local_path }}/web/app/themes/sage"
with_dict: "{{ wordpress_sites }}"
when: item.value.sage_template | default(false)
- name: Run bower install -for sage
command: bower install
---
- include: "{{ deploy_build_before | default('../hooks/example.yml') }}"
tags: deploy-build-before
- name: Copy project templates
template:
src: "{{ item.src }}"
dest: "{{ deploy_helper.new_release_path }}/{{ item.dest }}"
mode: "{{ item.mode | default('0644') }}"
with_items: project_templates
wordpress_sites:
roots-example-project.com:
site_hosts:
- roots-example-project.dev
local_path: roots-example-project.dev # path targeting local Bedrock site directory (relative to Ansible root)
site_install: true
site_title: Example Site
admin_user: admin
# admin_password: (defined in group_vars/development/vault.yml)
admin_email: admin@roots-example-project.dev
---
- include: database.yml
tags: wordpress-setup-database
- include: self-signed-certificate.yml
tags: wordpress-setup-self-signed-certificate
- include: nginx.yml
tags: wordpress-setup-nginx
- name: Create web root
file:
<?php
namespace SquareKings\Scores;
use SquareKings\Console\Commands\GetScoresCommand;
use SquareKings\Console\Commands\CreateTestGameCommand;
use SquareKings\Game;
use SquareKings\Team;
use SquareKings\Sport;
<?php namespace SquareKings;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Ramsey\Uuid\Uuid;
//use Laracasts\Commander\Events\EventGenerator;
use SquareKings\Games\GameStatusInterface;
use SquareKings\Events\SquareHasBeenActivated;
class Square extends Model implements GameStatusInterface
<?php namespace SquareKings\Broadcasting;
use GuzzleHttp\Client;
use Illuminate\Broadcasting\BroadcastManager;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
use SquareKings\Broadcasting\Broadcasters\PushStreamBroadcaster;
class PushStreamBroadcastManagerProvider extends ServiceProvider
module Tst
include("foo.jl")
using PyPlot
x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x))
plot(x, y, color="red", linewidth=2.0, linestyle="--")
end
def getOffsets(big_length, small_length, grid):
"""
return the lowest/highest offsets, if a shape of small length is
rendered and centered inside a larger shape length
Returns:
An OffsetInfo object with the following attributes:
loffset - lowest offset
hoffset - highest offset
"""