This file contains hidden or 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 lxml import html | |
import requests | |
import unicodecsv as csv | |
import argparse | |
def parse(zipcode,filter=None): | |
if filter=="newest": | |
url = "https://www.zillow.com/homes/for_sale/{0}/0_singlestory/days_sort".format(zipcode) | |
elif filter == "cheapest": |
This file contains hidden or 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
/* | |
This script verifies that the ssh and sudo functionalities are workng as expected | |
*/ | |
sshme.sh:: contents are below | |
sshpass -p password ssh -tt -o LogLevel=error -q id@$host <<'EOF' | |
ls| wc -l | |
echo password | sudo -S su - postgres -c "ls|wc -l" | |
exit | |
EOF |
This file contains hidden or 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 | |
echo "$1, 2 =$2, 3=$3" | |
tail -n0 -F "$1"| while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
"payload={ \"channel\": \"#tstpglogs\", \"text\": \"$( sed "s/\"/'/g" <<< $LINE )\"}" "$2"; | |
done | |
This file contains hidden or 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
Sharing some sample landa express to pull all ids in this cause distinct and separated by commas like ('1','2') | |
In this example a tab(table) object has list of parentId_pkids which is collection of fkids() and under each fkid object there is collection of string | |
NOdeleet = NOdeleet + tab.parentId_pkids.fkids().stream() | |
.map(fkid -> fkid.Pks.stream() | |
.filter(ids -> !ids.deleteable) | |
.map(ids -> ids.Pkids.stream() | |
.map(Object::toString) | |
.collect(Collectors.joining("','")) |
This file contains hidden or 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
### GIt prem delete a file | |
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch FOLDERNAME" -- --all | |
rm -rf .git/refs/original/ | |
### prune entries older than the specified time | |
git reflog expire --expire=now --all | |
### Cleanup unnecessary files and optimize the local repository; prune object older than now | |
git gc --prune=now |
This file contains hidden or 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
### CReate instance | |
gcloud compute instances create oracent --zone us-central1-a --image-family=centos-7 --image-project=centos-cloud --boot-disk-size "100" --boot-disk-type "pd-standard" --boot-disk-device-name "oracent" --boot-disk-auto-delete | |
### Start | |
gcloud compute instances start oracent --zone us-central1-a | |
#### Copy files over | |
gcloud compute scp c:\users\tgaj2\aws\ora\*.sh c:\users\tgaj2\aws\ora\Dockerfile tgaj2@oracent:/home/tgaj2 --zone us-central1-a | |
# SSH | |
gcloud compute ssh mylove@oracent --zone us-central1-a |
This file contains hidden or 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
DROP PROCEDURE SYS.COPYSCHEMA; | |
CREATE OR REPLACE PROCEDURE SYS.Copyschema | |
( | |
pschemafrom IN VARCHAR2, | |
pschemato IN VARCHAR2, | |
ptablespacefrom1 IN VARCHAR2 DEFAULT NULL, | |
ptablespaceto1 IN VARCHAR2 DEFAULT NULL, |
This file contains hidden or 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 `mysql`.`sf_compTablesInschemas`$$ | |
CREATE DEFINER=`root`@`%` FUNCTION `sf_compTablesInschemas`( pvchTablename VARCHAR(100),pvchSchema1 varchar(100) | |
,pvchSchema2 varchar(100) | |
) RETURNS varchar(20) CHARSET latin1 | |
DETERMINISTIC | |
BEGIN | |
declare asd int default 0; |
This file contains hidden or 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
CREATE OR REPLACE FUNCTION SYS.sf_compTablesInschemas | |
( | |
pvchTablename IN VARCHAR2, | |
pvchSchema1 in varchar2, | |
pvchSchema2 in varchar2 | |
) | |
return varchar2 | |
IS |
This file contains hidden or 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
create database clindb; | |
CREATE EXTERNAL TABLE IF NOT EXISTS comp_logs ( | |
`Date_Received` Date, | |
product STRING, | |
sub_product STRING, | |
issue INT, | |
sub_issue STRING, | |
Consumer_comp STRING, | |
comp_pub_response STRING, |
NewerOlder