Skip to content

Instantly share code, notes, and snippets.

class GuestbookTest extends PHPUnit_Extensions_Database_TestCase
{
public function testAddEntry()
{
$guestbook = new Guestbook();
$guestbook->addEntry("suzy", "Hello world!");
$queryTable = $this->getConnection()->createQueryTable(
'guestbook', 'SELECT * FROM guestbook'
);
<?php namespace App;
class Calc
{
public function add($a, $b)
{
return $a + $b;
}
}
@snize
snize / index.html
Created May 30, 2013 07:53
Meteor YouTube Search
<head>
<meta charset="UTF-8">
<title>Meteor YouTube Search</title>
</head>
<body>
<h1>YouTube Search</h1>
{{> youtubeSearch}}
</body>
<template name="youtubeSearch">
@snize
snize / config.fish
Created May 31, 2013 02:47
Settings for fish-shell ~/.config/fish/config.fish
# homebrew
set -x PATH /usr/local/bin /usr/local/sbin $PATH
# phpenv
#eval "$(phpenv init -)"
set -x PATH $HOME/.phpenv/bin $PATH
set -x PATH $HOME/.phpenv/shims $PATH
phpenv rehash >/dev/null ^&1
# rbenv
@snize
snize / Japanese tea.md
Created June 5, 2013 00:57
The name of the Japanese tea that you can use for your project.
  • Sencha
  • Gyokuro
  • Matcha
  • Kukicha
  • Konacha
  • Bancha
  • Kabusecha
  • Tencha
  • Genmaicha
  • Houjicha
if (Meteor.isClient) {
Template.template_main.results = function () {
return Session.get("recentUsage") || [];
}
Template.template_sidebar.events = {
'change .radio': function () {
var plant = this.key;
Meteor.call('latestPowerUsage', plant);
}
---
vagrantfile-local:
vm:
box: precise64
box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box'
hostname: null
network:
private_network: 192.168.56.101
forwarded_port:
Jw3OItwS0Sz0:
@snize
snize / 一般的な構造
Last active August 29, 2015 13:57
Chaplin.jsのファイル構造
.
├── application.coffee
├── assets
│   ├── images
│   └── index.html
├── controllers
│   ├── base
│   │   └── controller.coffee
│   └── home-controller.coffee
├── domainModels
@snize
snize / toggle-modules.sh
Created February 14, 2017 00:24
blt toggle-modules task for acquia cloud post-db-copy hook
#!/bin/sh
#
# Cloud Hook: post-db-copy
#
# The post-db-copy hook is run whenever you use the Workflow page to copy a
# database from one environment to another. See ../README.md for
# details.
#
# Usage: post-db-copy site target-env db-name source-env
@snize
snize / composer.lock
Created September 12, 2017 03:02
contenta_jsonapi #181
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "64b70bf417f227fe7e8bd1fe4cdfdbf9",
"packages": [
{
"name": "asm89/stack-cors",