This file contains hidden or 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
package com.example.tests; | |
import com.example.tests.config.TestDatabaseConfig; | |
import org.flywaydb.core.Flyway; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration; | |
import org.springframework.context.annotation.PropertySource; |
This file contains hidden or 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
/** | |
* @typedef {{ | |
* exportFormat: string, | |
* renderFormat: string, | |
* exportArguments: Array }} | |
*/ | |
some.namespace.MyClass.ARGUMENTS; | |
/** | |
* @param {some.namespace.MyClass.ARGUMENTS=} opt_config optional configuration object |
This file contains hidden or 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
# open intellij settings | |
# Editor -> Code Style -> (in context window) Formatter Control -> tick "Enable formatter markers in comments" | |
# @formatter:off | |
... | |
(r"/api/myapp/([0-9]+)/module/(some|uberlly|rediculouslly|long|line|of|code|that-will-probably|be-auto-formatted|into-multiple|lines|but|I've|arranged|like|this|intentionally)/datboi/export", my.awesome.over.80.line.Class) | |
... | |
# @formatter:on |
This file contains hidden or 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
# example of the contents of the environ variable that is passed to wsgi application callables. i.e. __call__(environ, reponse) | |
{'mod_wsgi.listener_port': '9999' | |
'HTTP_X_FORWARDED_SERVER': 'localhost' | |
'HTTP_REFERER': 'http://localhost:1234/app' | |
'beaker.get_session': <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x105da2190>> | |
'HTTP_ACCEPT_LANGUAGE': 'en-AU,en;q=0.8' | |
'CONTEXT_DOCUMENT_ROOT': '/.../myapp/conf/.mod_wsgi-express/api/htdocs' | |
'SERVER_SOFTWARE': 'Apache' | |
'SCRIPT_NAME': '' |
This file contains hidden or 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
export VENVS=$HOME/venvs # or whatever your virtualenvs folder is. | |
# first install brew_completion by calling `brew install brew-completion` | |
# will add bash_completion in the future. for now this is a place holder for when it will be needed. | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# if you're placing the _act function and its alias in their corresponding files | |
if [ -f $HOME/.bash_functions ]; then |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>BEFOREUNLOAD intercept example</title> | |
</head> | |
<body> | |
<h1>Try to close me!</h1> | |
<form action="javascript:console.log('stop poking me!');"> | |
<label for="something">sometimes you need to interact with the page before the browser will prompt you.</label><input type="text" id="something" /> | |
<input type="submit" /> |
This file contains hidden or 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
//after a little messing around, I found out how to use the goog.async.Debouncer properly | |
goog.require('goog.async.Debouncer'); | |
goog.require('goog.events.InputHandler'); | |
var usernameField_ = /* something like a textfield */ | |
var thingThatShouldHappenOnceAfterInterval = function(){ /* ... */ } | |
var inputHandler = new goog.events.InputHandler(userNameField_); | |
var eventHandler_ = /* @type goog.events.EventHandler */ | |
/* where the magic happens */ |