Skip to content

Instantly share code, notes, and snippets.

View phcostabh's full-sized avatar
🧑‍💻
Coding

Philippe Santana Costa phcostabh

🧑‍💻
Coding
View GitHub Profile
@phcostabh
phcostabh / event_sourcing_and_laravel.md
Last active August 6, 2019 10:49 — forked from scazz/event_sourcing_and_laravel.md
Event Sourcing, CQRS and Laravel
<style> blockquote { border: 1px solid #dddddd; border-radius: 5px; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1); margin-bottom: 1.36363636em; padding: 0; } blockquote > code {
@phcostabh
phcostabh / gmtime.lua
Created February 1, 2016 17:51 — forked from ichramm/gmtime.lua
Lua function that returns the current time in UTC.
--[[!
-- @return The current time in UTC
--]]
function gmtime()
return os.time(os.date("!*t"));
end
#!/usr/bin/env ruby
%w|rubygems active_record irb|.each {|lib| require lib}
ActiveSupport::Inflector.inflections.singular("toyota", "toyota")
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:database => ":memory:"
)
type = :info
time = Time.now
2_000_000.times do
msg = case type
when :success then 'alert-success'
when :error then 'alert-danger'
when :warn then 'alert-warning'
when :info then 'alert-info'
end
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()
#!/bin/bash
# have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz
if [ "$1" == "cleanup" ]; then
echo "Cleaning up old luajit install"
cd /usr/local/share
sudo rm -rf lua luajit-2.0.0-beta6
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
src = "#{ARGV[1]}.*.php"
tests = src.gsub("src/", "tests/Unit/")
watch(src) do |match|
match[0].gsub!("src/", "")
run_test %{tests/Unit/#{match[0]}}
end
watch(tests) do |match|
run_test match[0]