Skip to content

Instantly share code, notes, and snippets.

View package.json
{
"name": "redux-live-class-recipe-app",
"version": "1.0.0",
"description": "An MVP of a React+Redux-based Recipe management app for a live class.",
"scripts": {
"api": "NODE_ENV=development nodemon --exec babel-node -- api.js",
"start": "NODE_ENV=development node server.js",
"test": "tape -r babel-register 'src/**/*spec.js' | faucet",
"cover": "nyc -x '**/*spec.js' -r text -r html -r lcov npm test",
"lint": "eslint src"
View moxtree.new.conf
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/moxtree-l5.adamklein.io/before/*;
server {
listen 80 ssl;
server_name moxtree-l5.adamklein.io;
root /home/forge/moxtree-l5.adamklein.io/laravel5/public;
return 301 https://moxtree-l5.adamklein.io$request_uri;
View index.html
<!DOCTYPE html>
<!--[if lte IE 7]><html id="ie" class="no-js lt-ie10 lt-ie9 lt-ie8" lang="en" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if IE 8]><html id="ie8" class="no-js lt-ie10 lt-ie9" lang="en" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if IE 9]><html id="ie9" class="no-js lt-ie10" lang="en" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
<!--[if gt IE 9]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" lang="en" class="no-js">
<!--<![endif]-->
<!-- Mirrored from www.calemonattorney.com/ by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 10 Mar 2016 04:22:45 GMT -->
<head>
View UDEutils.py
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
"""
View Tst.jl
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
View PushStreamBroadcastManagerProvider.php
<?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
View Square.php
<?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
View ScoresServiceProvider.php
<?php
namespace SquareKings\Scores;
use SquareKings\Console\Commands\GetScoresCommand;
use SquareKings\Console\Commands\CreateTestGameCommand;
use SquareKings\Game;
use SquareKings\Team;
use SquareKings\Sport;
View main.yml
---
- 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:
View wordpress_sites.yml
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