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 app = angular.module('plunker', ['ngGrid']); | |
app.controller('MainCtrl', function($scope) { | |
$scope.name = 'World'; | |
$scope.fruits = [ 'Apple', 'Orange' ,'Banana']; | |
$scope.myData = [ | |
{name: "Moroni", age: 50}, |
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
create table oauth_client_details ( | |
client_id VARCHAR(256) PRIMARY KEY, | |
resource_ids VARCHAR(256), | |
client_secret VARCHAR(256), | |
scope VARCHAR(256), | |
authorized_grant_types VARCHAR(256), | |
web_server_redirect_uri VARCHAR(256), | |
authorities VARCHAR(256), | |
access_token_validity INTEGER, | |
refresh_token_validity INTEGER, |
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
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
return application.sources(Application.class); | |
} | |
public static void main(String[] args) throws Exception { | |
SpringApplication.run(Application.class, args); |
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
@EnableWebMvcSecurity | |
@Configuration | |
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Autowired | |
private DataSource dataSource; | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { |
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
#logging.level.org.springframework.web: DEBUG | |
logging.level.org.springframework.security=DEBUG | |
spring.datasource.url=jdbc:h2:mem:AZ;INIT=CREATE SCHEMA IF NOT EXISTS AZ;RUNSCRIPT FROM 'src/main/resources/create.sql';DB_CLOSE_ON_EXIT=FALSE | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.datasource.username=sa | |
spring.datasource.password= | |
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect | |
spring.jpa.hibernate.ddl-auto=create-drop |
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
spring.datasource.url=jdbc:postgresql://localhost/myDatabase | |
spring.datasource.username=user | |
spring.datasource.password=password | |
spring.datasource.driverClassName=org.postgresql.Driver | |
spring.jpa.hibernate.hbm2ddl.auto=update | |
spring.jpa.hibernate.ejb.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy | |
spring.jpa.hibernate.show_sql=true | |
spring.jpa.hibernate.format_sql=true | |
spring.jpa.hibernate.use_sql_comments=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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE") | |
} | |
} | |
apply plugin: 'java' |
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
git commit -a -m 'added new benchmarks' | |
automatically stage every file that is already tracked before doing the commit, letting you skip the git add part: | |
Rename a file in git | |
$ git mv file_from file_to | |
Show a history of commits | |
$ git log -p -2 |
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
user jessed staff; | |
worker_processes 2; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
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 express = require('express'), | |
httpProxy = require('http-proxy'), | |
app = express(); | |
var proxy = new httpProxy.RoutingProxy(); | |
function apiProxy(host, port) { | |
return function(req, res, next) { | |
if(req.url.match(new RegExp('^\/api\/'))) { | |
proxy.proxyRequest(req, res, {host: host, port: port}); |
OlderNewer