View server.js
// author Renato Back (renatopb@gmail.com) | |
const Hapi = require('hapi'); | |
const MongoClient = require('mongodb').MongoClient; | |
const server = Hapi.server({ | |
port: 3000, | |
debug: { | |
request: ['*'] | |
} |
View application-logger.decorator.ts
import * as _ from 'lodash'; | |
import { FunctionLoggerOptions } from './interfaces'; | |
import { defaultFunctionOptions } from './default-options'; | |
import { logMessage } from './messages.helper'; | |
export const logger = function (options = defaultFunctionOptions): Function { | |
return function(target: any, methodName: string, descriptor: any) { | |
if (descriptor === undefined) { | |
descriptor = Object.getOwnPropertyDescriptor(target, methodName); |
View PKZIP APPNOTE 6.3.4.
File: APPNOTE.TXT - .ZIP File Format Specification | |
Version: 6.3.4 | |
Status: Final - replaces version 6.3.3 | |
Revised: October 1, 2014 | |
Copyright (c) 1989 - 2014 PKWARE Inc., All Rights Reserved. | |
1.0 Introduction | |
--------------- | |
1.1 Purpose |
View DeckCounter.java
package performer.oss.usecases.oss_014; | |
import java.util.*; | |
/** | |
* 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K, A | |
The four suits are: | |
S - Spade (♠), C - Club(♣), H - Heart(♥), D - Diamond(♦) |
View object-watch.js
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
View object-watch.js
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
View Hackerrank - A Very Simple Multiple
import java.math.BigDecimal; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
import java.util.regex.Pattern; | |
// https://www.hackerrank.com/challenges/a-very-special-multiple | |
public class AVerySpecialMultiple { | |
private static Pattern PATTERN = Pattern.compile("^(4+)(0*)$"); |
View idea-reset-evaluation.sh
#!/bin/bash | |
echo "removeing evaluation key" | |
rm ~/.IntelliJIdea15/config/eval/idea15.evaluation.key | |
echo "resetting evalsprt in options.xml" | |
sed -i '/evlsprt/d' ~/.IntelliJIdea15/config/options/options.xml | |
echo "resetting evalsprt in prefs.xml" | |
sed -i '/evlsprt/d' ~/.java/.userPrefs/prefs.xml |
View Input with suggestions
import React, {Component} from "react"; | |
import { | |
Dimensions, | |
Image, | |
Keyboard, | |
Modal, | |
Platform, | |
ScrollView, | |
StyleSheet, | |
Text, |