This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For all available options, see node_modules/pho-dev-stack/config.js | |
// These are production build settings, see gulpfile.js for development settings | |
var gulp = require('gulp'); | |
var extend = require('node.extend'); | |
var substituteConfig = require('./substitute-config'); | |
require('pho-devstack')(gulp, { | |
dist: { | |
/* Directories and file patterns for build output */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Atrox\Matcher; | |
use Atrox\Curl; | |
use Atrox\Async; | |
$userListMatcher = Matcher::multi('//table[@class="ui-table-list"]//tr', (object) [ | |
'url' => Matcher::single('td/a/@href')->map(function ($x) { return "http://www.csfd.cz$x"; }), | |
'points' => Matcher::single('td[3]')->asInt(), | |
'ratings' => Matcher::single('td[4]')->asInt(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'Twitter' | |
# Create a read write application from : | |
# https://apps.twitter.com | |
# authenticate it for your account | |
# fill in the following | |
config = {consumer_key: '', consumer_secret: '', | |
access_token: '', access_token_secret: ''} | |
me = 'Blaze Boy' # to prevent DM yourself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mocks; | |
use Doctrine\DBAL\Driver\Statement; | |
/** | |
* Doctrine DBAL Statement implementing \Iterator. | |
* | |
* This class has been created because of a bug in PHPUnit Mock Objects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MAIN INNODB TABLE FOR ARTICLES | |
CREATE TABLE `article` ( | |
`id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, | |
`title` VARCHAR(50) NOT NULL, | |
`abstract` TEXT NOT NULL, | |
`content` MEDIUMTEXT NOT NULL, | |
`publish_date` DATETIME NULL DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) | |
COLLATE='utf8_general_ci' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
// create canvas | |
var canvas = document.createElement("canvas"); | |
canvas.height = 300; // important! because default canvas size is 300x150 | |
var ctx = canvas.getContext('2d'); | |
// create img | |
var img = document.createElement("img"); | |
// IMPORTANT adding shadow map - each area has different background color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
module Trashable | |
extend ActiveSupport::Concern | |
included do | |
define_model_callbacks :trash, :only => [ :after, :before ] | |
default_scope where('trashed_at IS NULL') | |
scope :trashed, where('trashed_at IS NOT NULL') | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 'rem' is a Sass mixin that converts pixel values to rem values for whatever property is passed to it. | |
* It returns two lines of code — one of the regular pixel values (for IE), and another with the | |
* converted rem values (for everyone else). Special thanks to Chris Epstein (http://chriseppstein.github.com) | |
* and Martin Bavio (http://martinbavio.com) for the help and code! | |
* | |
* Sample input: | |
* .element { | |
* @include rem('padding',10px 0 2px 5px); | |
* } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<!-- This should be the simplest possible jQuery based CouchApp. Install by uploading to a design document in Futon or putting in _attachments/index.html and running `couchapp push` --> | |
<head><title>Tiny CouchApp</title></head> | |
<body> | |
<h1>Tiny CouchApp</h1> | |
<ul id="databases"></ul> | |
</body> | |
<script src="/_utils/script/jquery.js"></script> | |
<script src="/_utils/script/jquery.couch.js"></script> |
NewerOlder