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 toDate (ts){ | |
try{ | |
if(! isNullAndUndefined(ts)){ | |
var ps = mongoEvaluation(ts).$date; | |
var firstsplit = ps.split("T"); | |
var date = firstsplit[0]; | |
var time = firstsplit[1]; | |
var datesplit = date.split("-"); | |
var timesplit = time.split(":"); | |
var secondsplit = timesplit[2].split("."); |
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 dynamic; | |
public class CustomDynamicSchema extends FilterDynamicSchemaProcessor implements DynamicSchemaProcessor { | |
public String username; | |
public SessionService sessionService; | |
@Autowired | |
public void setSessionService(SessionService sessionService){ | |
this.sessionService = sessionService; |
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
//Script here | |
var io =isUndefined (e(io),0).number; | |
var mp =isUndefined (e(mp),0).number; | |
var tmp; | |
eval("tmp = " + creatives); | |
var n =isUndefined (n,0); |
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 | |
# The user's home directory | |
USER_HOME=$(eval echo ~${SUDO_USER}) | |
FILE=${USER_HOME}/.kettel/kettle_config.properties | |
# time | |
NOW=$(date +"%d%m%Y_%H%M%S") | |
NOW_TIME=$(date +"%d/%m/%Y")" "$(date +"%H:%M:%S") | |
LOG=$NOW_$3.log | |
pdi=$(grep -i 'PATH_TO_DATA_INTEGRATION' $FILE | cut -f2 -d'=') |
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
type=command | |
command=echo "basic_1st_command.job" |
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
#/etc/nginx/sites-enabled/default | |
server { | |
listen 80; | |
server_name redcloverbi.com; | |
root /etc/tomcat7/webapps/apple; | |
proxy_cache one; | |
location / { | |
proxy_set_header X-Forwarded-Host $host; |
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 | |
# | |
# azkaban This shell script takes care of starting and stopping | |
# the azkaban | |
# | |
# Source function library | |
. /etc/rc.d/init.d/functions | |
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
\set ON_ERROR_STOP on | |
--MEDIAN: | |
select * from allsales order by sales; | |
SELECT state, name, sales, MEDIAN(sales) OVER () AS | |
median FROM allsales order by state; | |
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 | |
# https://i-heart-geek.blogspot.com.es/2011/10/top-command-line-tips-apache-access-log.html?m=1 | |
# http://www.the-art-of-web.com/system/logs/ | |
ip = ifconfig | awk '/inet addr/{print substr($2,6)}' | |
clear | |
while : | |
do | |
echo "1) Most Common 404s (Page Not Found)" | |
echo "2) Count requests by HTTP code" | |
echo "3) Largest Images" |
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 | |
# Maintain for @sowe Rafael Valenzuela <ravamo@gmail.com> | |
# redcloverbi.wordpress.com for more information | |
# basic backup and restore script for pentaho in Production enviroment doc | |
# https://help.pentaho.com/Documentation/6.1/0P0/000/020 | |
# https://help.pentaho.com/Documentation/6.1/0P0/000/Backup_and_Restore_Pentaho_Repositories | |
set -e | |
set -u |
OlderNewer