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
<VirtualHost *:80> | |
.... | |
ServerName wordpress.example.com | |
.... | |
</VirtualHost> | |
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
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
#!/bin/bash | |
BASE_PATH=`pwd` | |
NGINX_CONFIGURATION=$BASE_PATH/proxy-nginx/default.conf | |
echo "=== Creating 'proxy_nginx' with (nginx) ===" | |
echo "=== Variables ===" | |
echo '$NGINX_CONFIGURATION=' $NGINX_CONFIGURATION | |
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
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
server_name wordpress.example.com; | |
... |
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
sudo chmod +x *.sh |
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
var feature_change = require ('feature-change'); | |
var Q = require(‘q’); | |
exports.getData = function(request, response, next) { | |
var options = { | |
expected: function(cb){ | |
currentImplementation(request, response, next, cb); | |
}, | |
actual: function(cb){ | |
newImplementation(request, response, next, cb); |
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
var options : { | |
... | |
areEqual: customResultsComparator | |
... | |
} | |
function customResultsComparator(currentResult, newResult){ | |
//This method compare current and new results using your criteria and return true or false. | |
} |
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
const ioc = require('nan-ioc'); | |
class B { | |
sayHello () { | |
return `When call to aService he says ${this.a.sayHello()}`; | |
} | |
} | |
const config = { | |
user: { name: 'John Smith' } | |
}; |
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
class MainActivity : AppCompatActivity() { | |
private val firebaseAuth by inject<FirebaseAuth>() | |
var providers = Arrays.asList( | |
AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), | |
AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()) | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
createContentButton.setOnClickListener({ |
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
// ... | |
override fun onCreate(savedInstanceState: Bundle?) { | |
// ... | |
createContentButton.setOnClickListener({ | |
startActivity(authViewModel.getActionIntent()) | |
}) | |
// ... |
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
class AuthViewModel(val authenticator: Authenticator, val context: Context) { | |
var providers = Arrays.asList( | |
AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(), | |
AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()) | |
fun getActionIntent(): Intent { | |
return if (authenticator.isAuthenticated()) { | |
Intent(context, NewContentActivity::class.java) | |
} else { | |
AuthUI.getInstance() |