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
# use 'compiledb' to create a 'compile_commands.json' | |
ifneq (,$(shell which compiledb 2>&1)) | |
compile_commands.json: | ${C_SRCS} | |
${MAKE} -Bnwk build-only | sed -e 's#\\#\\\\\\\\#g' -e "s#'\"\\([^']*\\)\"'#\"\\\\\"\1\\\\\"\"#g" | compiledb -o $@ | |
# hook into post build | |
post-build: | compile_commands.json | |
endif |
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
## section only for 'clean' target | |
# CDT's generated makefile contains a clean target containing so many files, it can't be executed on windows | |
# this is a workaround to invoke a per file delete instead, without the need to switch to writing the makefiles | |
# manualy. | |
# if make is called with 'clean' as the first argument, prepare some special workaround to limit command line length | |
ifeq (clean,$(firstword $(MAKECMDGOALS))) | |
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
defmodule Acme.Repo do | |
use Ecto.Repo, | |
otp_app: :acme, | |
adapter: Ecto.Adapters.Postgres | |
def with_prefix(prefix) do | |
module_atom = Module.concat([Acme, Repo, WithPrefix, Macro.camelize(prefix)]) | |
# We could not find a better way to see if this module already existed | |
if !Kernel.function_exported?(module_atom, :prefix, 0) do |
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
-- psql -U postgres -h localhost -f /path/to/tardis.sql | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
SET row_security = off; |
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
bil@fbsd-bil:~ %>su - | |
Password: | |
root@fbsd-bil:~ # beadm create 11.1-RELEASE | |
Created successfully | |
root@fbsd-bil:~ # beadm mount 11.1-RELEASE /mnt | |
Mounted successfully on '/mnt' | |
root@fbsd-bil:~ # freebsd-update upgrade -b /mnt -r 11.1-RELEASE |