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
"use strict"; | |
var page = require('webpage').create(), | |
system = require('system'), | |
address, output, size, pageWidth, pageHeight; | |
if (system.args.length < 3 || system.args.length > 5) { | |
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]'); | |
console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'); | |
console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px'); | |
console.log(' "800px*600px" window, clipped to 800x600'); | |
phantom.exit(1); |
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 | |
set -e | |
set -u | |
readonly CAMELCASE='\b[A-Z]+(_[A-Z]+)*\b'; | |
readonly SANKCASE='\b[A-Z]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\b'; | |
FULL_OK="false" | |
function _console(){ |
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 |
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
\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/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
#/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
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
#!/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
//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); |
NewerOlder