Firstly install Brew on your MAC
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install PHP
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
import type { Product } from '@prisma/client'; | |
import type { LoaderFunction } from '@remix-run/node'; | |
import { Link, useLoaderData } from '@remix-run/react'; | |
import { db } from '~/db/db.server'; | |
interface LoaderData { | |
products: Product[]; | |
count: number; | |
pageNumber: number; | |
} |
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |
production: # Environment | |
first_thing: # Hook point | |
command: apt-get install freetds-bin freetds-dev nodejs -y | |
target: any # Hook fields | |
execute: true | |
sudo: true | |
Firstly install Brew on your MAC
Then install PHP
#include "ofMain.h" | |
#include "ofxTiming.h" | |
class ofApp : public ofBaseApp { | |
public: | |
ofVideoGrabber grabber; | |
DelayTimer delay; | |
ofTrueTypeFont font; | |
string description; | |
require 'rake/file_list' | |
IMAGES = Rake::FileList['*.Dockerfile'].collect {|f| f[/.+(?=\.Dockerfile)/] } | |
namespace :images do | |
IMAGES.each do |name| | |
desc "Build image '#{name}'" | |
task "build_#{name}" do | |
sh "docker build -f #{name}.Dockerfile -t mtrense/#{name} ." | |
end |
/** | |
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. | |
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter, | |
* waits six seconds and returns the cookies required to continue using this site. With this, | |
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's | |
* anti-bot protection. | |
* | |
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/ | |
* | |
* Copyright © 2015 by Alex Wilson <[email protected]> |
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() | |
{ |