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 8080; | |
server_name localhost; | |
access_log /var/log/nginx/website.access_log; | |
error_log /var/log/nginx/website.error_log; | |
root /path/to/silex/web/; | |
index index.php; |
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
zcat dump_one.sql.gz | mysql --user=root --password=root db1 && zcat dump_2.sql.gz | mysql --user=root --password=root db2 |
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 | |
sudo apt-get update | |
# Now let's install all the required ubuntu packages | |
sudo apt-get install build-essential uwsgi nginx uwsgi-plugin-python python-pip | |
# PS! If you are doing this stuff for fun I do recommend to install nginx from PPA repository | |
# that you can find here https://launchpad.net/~nginx/+archive/development |
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
@Configuration | |
public class MultiConnectionSupport { | |
@Value("${server.port}") | |
private int serverPort; | |
@Value("${server.http.port}") | |
private int httpServerPort; | |
@Bean | |
public EmbeddedServletContainerFactory servletContainer() { |
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
public class PrivateConstructorTest { | |
@Test | |
public void utilClassConstructorMustBePrivate() throws Exception { | |
// Replace ReportBuilderUtils with class name under test | |
final Constructor<ReportBuilderUtils> constructor = ReportBuilderUtils.class.getDeclaredConstructor(); | |
assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); | |
constructor.setAccessible(true); | |
constructor.newInstance(); | |
} | |
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
// Importing jQuery in ES6 style | |
import $ from "jquery"; | |
// We need to expose jQuery as global variable | |
window.jQuery = window.$ = $; | |
// ES6 import does not work it throws error: Missing jQuery | |
// using Node.js style import works without problems | |
require('bootstrap'); |
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
find . -name "*.iml" -exec rm -rf {} \; |
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
"%ConEmuDrive%\Program Files\Git\bin\sh.exe" --login -i -new_console:a |
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
docker stop $(docker ps -a -q) |
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
version: "3" | |
services: | |
sample_app: | |
# PHP 7 with ZeroMQ installed | |
build: . | |
depends_on: | |
- filebeat | |
working_dir: /app | |
command: php index.php | |
volumes: |
OlderNewer