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
-- Reset the query cache | |
RESET QUERY CACHE; | |
-- Closes all open tables, forces all tables in use to be closed, and flushes the query cache. | |
FLUSH TABLES; | |
-- Show character set in use by client, server, etc. | |
SHOW VARIABLES LIKE 'character_set%'; |
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
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
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 interface IObjectContext : IDisposable | |
{ | |
ObjectContextOptions ContextOptions { get; } | |
TEntity CreateObject<TEntity>() where TEntity : class; | |
IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class; | |
int SaveChanges(); | |
} |
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 BlockingQueue implements Queue { | |
private java.util.Queue queue = new java.util.LinkedList(); | |
/** | |
* Make a blocking Dequeue call so that we'll only return when the queue has | |
* something on it, otherwise we'll wait until something is put on it. | |
* | |
* @returns This will return null if the thread wait() call is interrupted. | |
*/ |
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
-- Example of how to fix double encoded UTF-8 in mysql with a single mysql query. | |
-- This example assumes that the data has been inserted with NAMES=latin1. | |
-- | |
-- XXX: Do not rely on this to work without testing it. XXX | |
-- | |
-- XXX: If this is run on a column with a UNIQUE index and the COLLATE is | |
-- case-insensitive this might fail. The reason for this is that double-encoded | |
-- upper and lower case chars are considered different but when encoded correctly | |
-- they will be considered the same. |
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 com.paddypower.financials.market.management.rest.logging; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
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/sh | |
### BEGIN INIT INFO | |
# Provides: jmeter-server | |
# Required-Start: $syslog $local_fs | |
# Required-Stop: $syslog $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Apache JMeter Remote Server | |
# Description: Apache JMeter Remote Server runs JMeter tests issued from a remote server. | |
### END INIT INFO |
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/sh | |
# This script will connect to an AFP server when iTunes is running | |
# 2012-09-07 | |
HOST="hostname" # AFP server, e.g. server.local or 192.168.1.94 or… | |
USER="your_user_name" # for connection to AFP server | |
PASS="your_password" # for connection to AFP server | |
VOLUMENAME="your_volume_name" # name of volume to be mounted, typically username on AFP server. |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation template to deploy jenkins/nginx.", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type" : "String", |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
"""emlx.py | |
Class to parse email stored with Apple proprietary emlx format | |
Created by Karl Dubost on 2013-03-30 | |
Inspired by Rui Carmo — https://the.taoofmac.com/space/blog/2008/03/03/2211 | |
MIT License""" | |
OlderNewer