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
package yourpackage.util.hibernate.multitenancy; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import java.util.Map; | |
import org.hibernate.HibernateException; | |
import org.hibernate.service.config.spi.ConfigurationService; | |
import org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider; | |
import org.hibernate.service.jdbc.connections.spi.MultiTenantConnectionProvider; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:security="http://www.springframework.org/schema/security" | |
xmlns:oauth="http://www.springframework.org/schema/security/oauth2" | |
xmlns:http="http://www.springframework.org/schema/security" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd | |
http://www.springframework.org/schema/security | |
http://www.springframework.org/schema/security/spring-security-3.2.xsd |
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
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock |
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
$subscriberClass = new \ReflectionClass(TestSubscriber::class); | |
$annotationReader = new AnnotationReader(); | |
$mappings = []; | |
// Registry | |
foreach ($subscriberClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { | |
$annotation = $annotationReader->getMethodAnnotation($method, Subscribe::class); | |
$parameters = $method->getParameters(); | |
if (!$annotation || empty($parameters)) { |
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
#cloud-config | |
coreos: | |
fleet: | |
public-ip: $public_ipv4 | |
metadata: region=dfw,provider=rackspace | |
etcd: | |
discovery: https://discovery.etcd.io/youridhere | |
# multi-region and multi-cloud deployments need to use $public_ipv4 | |
# We'll actually fill this in using fixup_etc.sh (see below) | |
# addr: $rax_privatenet_ipv4:4001 |
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
DELIMITER ;; | |
DROP FUNCTION IF EXISTS shard_nextval;; | |
CREATE FUNCTION shard_nextval() RETURNS BIGINT | |
BEGIN | |
INSERT INTO shard_seq VALUES (NULL); | |
SET @R_ObjectId_val = LAST_INSERT_ID(); | |
DELETE FROM shard_seq; | |
RETURN @R_ObjectId_val; | |
END;; |
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
#cloud-config | |
coreos: | |
etcd2: | |
discovery: https://discovery.etcd.io/<token> | |
advertise-client-urls: http://$private_ipv4:2379, http://$private_ipv4:4001 | |
initial-advertise-peer-urls: http://$private_ipv4:2380 | |
listen-client-urls: http://0.0.0.0:2379, http://0.0.0.0:4001 | |
listen-peer-urls: http://$private_ipv4:2380, http://$private_ipv4:7001 | |
fleet: |
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 struct Key<T> { | |
let id: String | |
private let type: T.Type = T.self | |
} | |
extension Key: Hashable { | |
public var hashValue: Int { | |
get { | |
return self.id.hashValue ^ "\(self.type)".hashValue | |
} |
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 l = l || {}, m = this; | |
function n(a) { | |
return "string" == typeof a; | |
} | |
function p(a, b) { | |
a = a.split("."); | |
b = b || m; | |
for (var c = 0; c < a.length; c++) { | |
if (b = b[a[c]], null == b) { | |
return null; |
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
function provideToExport(file, api, options) { | |
const j = api.jscodeshift; | |
const root = j(file.source); | |
return root | |
.find(j.ExpressionStatement, { | |
expression: { | |
type: "CallExpression", | |
callee: { | |
object: { | |
name: "goog" |
OlderNewer