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
$(document).ready(function() { | |
// convert all a/href to a#href | |
$("body").delegate("a", "click", function(){ | |
var href = $(this).attr("href"); // modify the selector here to change the scope of intercpetion | |
// Push this URL "state" onto the history hash. | |
$.bbq.pushState(href,2); | |
// Prevent the default click behavior. |
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
import shutil, errno | |
def copyanything(src, dst): | |
try: | |
shutil.copytree(src, dst) | |
except OSError as exc: # python >2.5 | |
if exc.errno == errno.ENOTDIR: | |
shutil.copy(src, dst) | |
else: raise |
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 | |
import argparse | |
import json | |
import random | |
import sys | |
def get_topic( args, data ): | |
topic = data['partitions'][0]['topic'] | |
for partition in data['partitions']: |
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
from django import template | |
register = template.Library() | |
MOMENT = 120 # duration in seconds within which the time difference | |
# will be rendered as 'a moment ago' | |
@register.filter | |
def naturalTimeDifference(value): | |
""" |
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/bash | |
# | |
# glassfish: Startup script for Glassfish Application Server. | |
# | |
# chkconfig: 3 80 05 | |
# description: Startup script for domain1 of Glassfish Application Server. | |
GLASSFISH_HOME=/home/glassfish/glassfish; | |
export GLASSFISH_HOME |
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
conf = pyspark.SparkConf() | |
conf.set("spark.sql.tungsten.enabled", "false") | |
sc = getOrCreateSparkContext(conf) |
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
-moz-binding | |
-moz-border-bottom-colors | |
-moz-border-left-colors | |
-moz-border-radius | |
-moz-border-radius-bottomleft | |
-moz-border-radius-bottomright | |
-moz-border-radius-topleft | |
-moz-border-radius-topright | |
-moz-border-right-colors | |
-moz-border-top-colors |
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
{ | |
"filtered" : { | |
"query" : { | |
"range" : { | |
"c100" : { | |
"from" : "0", | |
"to" : "5293983999", | |
"include_lower" :true, | |
"include_upper" : true | |
} |
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
[root@ct-0088 ~]# ./bin/elasticsearch | |
[root@ct-0088 ~]# ./logs/elasticsearchStaging_4hr.log | |
[2013-07-12 14:07:56,405][INFO ][node ] [CT-0088] {0.90.0.RC2}[3049]: starting ... | |
[2013-07-12 14:07:56,567][INFO ][transport ] [CT-0088] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.50.171:9300]} | |
[2013-07-12 14:07:59,598][INFO ][cluster.service ] [CT-0088] new_master [CT-0088][Zukt8ivLRd6LIzeZoriR8A][inet[/192.168.50.171:9300]]{max_local_storage_nodes=1}, reason: zen-disco-join (elected_as_master) | |
[2013-07-12 14:07:59,620][INFO ][discovery ] [CT-0088] elasticsearchStaging_4hr/Zukt8ivLRd6LIzeZoriR8A | |
[2013-07-12 14:07:59,659][INFO ][http ] [CT-0088] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.50.171:9200]} | |
[2013-07-12 14:07:59,660][INFO ][node ] [CT-0088] {0.90.0.RC2}[3049]: started | |
[2013-07-12 14:08:01,055][INFO ][gateway.local.state.meta ] [CT-0088] [mlivemas |
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
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="locations"> | |
<list> | |
<value>classpath:config.properties</value> | |
<value>file:/path/local/config.properties</value> | |
</list> | |
</property> | |
<property name="ignoreResourceNotFound" value="true" /> | |
</bean> |
NewerOlder