Skip to content

Instantly share code, notes, and snippets.

View preslavmihaylov's full-sized avatar

Preslav Mihaylov preslavmihaylov

View GitHub Profile
@jeffreyscarpenter
jeffreyscarpenter / cqlsh_intro.cql
Last active May 1, 2024 03:06
Introduction to CQL / cqlsh
#
# cqlsh_intro.cql
#
# Copyright (C) 2017 Jeff Carpenter
# Execute the commands in this file for a short guided tour of the CQL Shell (cqlsh)
#
# For more description, see Cassandra, The Definitive Guide 2nd Ed., Chapter 3: Installing
# http://shop.oreilly.com/product/0636920043041.do
#
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@agoston
agoston / TransactionTemplate.java
Last active June 1, 2024 13:38
JdbcTemplate manual transaction example, using TransactionTemplate
//[... initialize ...]
final SimpleDataSourceFactory simpleDataSourceFactory = new SimpleDataSourceFactory("com.mysql.jdbc.Driver");
final DataSource dataSource = simpleDataSourceFactory.createDataSource(jdbcUrl, user, pass);
jdbcTemplate = new JdbcTemplate(dataSource);
final DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
transactionTemplate = new TransactionTemplate(transactionManager);
transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);