Skip to content

Instantly share code, notes, and snippets.

View welsayedaly's full-sized avatar
🎯
Focusing

Walid El Sayed Aly welsayedaly

🎯
Focusing
View GitHub Profile
@welsayedaly
welsayedaly / gist:b6ed2aaac099759bc8cdbaa0c54e6bc6
Created February 26, 2018 10:02
spring database xml-configuration
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:context="http://www.springframework.org/schema/context";
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">;
<bean id="corporateEventDao" class="com.example.JdbcCorporateEventDao">
<property name="dataSource" ref="dataSource"/>
@welsayedaly
welsayedaly / jdbcTemplate
Created February 26, 2018 10:04
jdbcTemplate
private JdbcTemplate jdbcTemplate;
public void setDataSource(DataSource dataSource) {
this.jdbcTemplate = new JdbcTemplate(dataSource);
} }
@welsayedaly
welsayedaly / dataSourceBeforeSpy
Created February 26, 2018 10:05
dataSourceBeforeSpy
<pre lang="xml">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/></bean>
</pre>
@welsayedaly
welsayedaly / dataSourceWithSpy
Created February 26, 2018 10:06
dataSourceWithSpy
<pre lang="xml">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="craftsman.spy.SpyDriver"
<property name="url" value="jdbc:spy:mysql://server.com:5000/database"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/> </bean>
</pre>
curl -d "param1=value1&param2=value2" -H "Content-Type: application/json" -X POST http://localhost:3000/data
http POST http://localhost:3000/data 'param1=value1' 'param2=value2'
http http://hostname/resource
curl -i -H "Accept: application/json" -X GET http://hostname/resource
@welsayedaly
welsayedaly / triggerAndMySqlFunctionProcess.jpg
Last active August 13, 2020 10:54
Modell for Write some MySQL code project
Enclosed you see the process to this request:
@welsayedaly
welsayedaly / main.tf
Created November 10, 2021 10:11
main.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
}
}
required_version = ">= 1.0.4"
}