Skip to content

Instantly share code, notes, and snippets.

sealed trait ChunkState
object ChunkState extends CrowdscriberEnum[ChunkState] {
override def toString = "ChunkState"
val values = Set(ASSIGNED, EXPIRED, IN_PROGRESS, SUBMITTED, APPROVED, REJECTED, NEEDS_EDITING, COMPLETE)
val stringMap = values.map(v => (v.toString, v)).toMap
def valueOf(s: String) = stringMap.get(s)
object ASSIGNED extends ChunkState { override def toString = "ASSIGNED" }
object EXPIRED extends ChunkState { override def toString = "EXPIRED" }
implicit val chunkStateType = MappedColumnType.base[ChunkState,String](
{ cs:ChunkState => cs.toString},
{ s: String => ChunkState.valueOf(s).get}
)
@ctataryn
ctataryn / pcd.sh
Last active February 25, 2016 20:21
pcd - Parent Change Directory -- One of my favourite little .bashrc includes. Just source this file from .bashrc and then at a command prompt you can type "pcd <some parent dir>" and you'll be automatically back to the folder specified
find_target(){
## The target directory
_target=$1
## Iterate through the parent directories
printf "%s\n" "$PWD" | sed -r 's#/#/\n#g' |
while read parent_dir;
do
## Check if the target directory exists under this
## aprent directory and if it does, print the
## target's path and break the loop.
def complete(status: StatusCode)
def complete[T :Marshaller](obj: T)
def complete[T :Marshaller](status: StatusCode, obj: T)
def complete[T :Marshaller](status: StatusCode, headers: List[HttpHeader], obj: T)
def complete(response: HttpResponse)
def complete(future: Future[HttpResponse])
def complete(future: Future[StatusCode])
BuildingBuilding.Cleanup error.
Object function glob(pattern, options, cb) {
if (typeof options === "function") cb = options, options = {}
if (!options) options = {}
if (typeof options === "number") {
deprecated()
return
}
import constants from 'tpr-tol-ui/constants/main';
export var initialize = function(container, app) {
app.register('constants:main', constants);
app.inject('controller' , 'constants', 'constants:main');
app.inject('view' , 'constants', 'constants:main');
app.inject('model' , 'constants', 'constants:main');
app.inject('route' , 'constants', 'constants:main');
app.inject('component' , 'constants', 'constants:main');
$.ajaxSetup({
statusCode : {
//403 should mean they don't have a session, however if we
//throw 403s for more granular pressision checks, we'll want
//to do some further checking here to see if the session is
//indeed invalid before showing the session expiry dialog
//and bouncing them to the landing page
403: function() {
var route = container.lookup('route:application');
var sessionController = container.lookup('controller:session');
export default function translationsFr() {
return {
"landTitlesOnline":"Titres fonciers en ligne",
"titlesOnline":"Titres en ligne",
"login":"Connexion",
"logoff":"Déconnexion",
"password":"Mot de passe",
"changePassword":"Changer le mot de passe.",
"login.securedSite":"Le présent site est sécurisé. Vous devez être un utilisateur autorisé pour y accéder. Remplacer par les instructions d'accès.",
"login.forgottenCredentials":"Si vous avez oublié votre identificateur d'utilisateur ou votre mot de passe, remplacer par les instructions pour recouvrer l'accès.",
var route = container.lookup('route:application');
route.render('confirmation-modal', {
into: 'application',
outlet: 'modal',
model: {message: 'OHAI!'}
});
{
"name": "tpr-tol-ui",
"dependencies": {
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"ember": "1.7.0",
"ember-data": "1.0.0-beta.12",
"ember-resolver": "~0.1.7",
"loader.js": "stefanpenner/loader.js#1.0.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",