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 bash | |
ProgName=$(basename $0) | |
function main(){ | |
# Main Caller Function | |
parse_args "$@" | |
} | |
function parse_args(){ | |
sub_command=$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
# To list all the status whether they are enabled or disabled. | |
systemctl list-unit-files --type=service | |
# Grep The ID of Docker image having some name NAME | |
NAME=$0 | |
docker ps | grep $NAME | awk 'print ${0}' | |
# To find a file that is not executable and is of text type | |
find . -type f ! -executable -exec file {} + | grep -w text |
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
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
STAT=`parse_git_dirty` | |
echo "[${BRANCH}${STAT}]" | |
else | |
echo "" | |
fi |
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
# -*- coding: utf-8 -*- | |
# Define your item pipelines here | |
# | |
# Don't forget to add your pipeline to the ITEM_PIPELINES setting | |
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html | |
import nmap | |
from scrapy.exceptions import DropItem | |
nm = nmap.PortScanner() |
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 scrapy | |
import datetime | |
import scraper.items as ProxyItems | |
from scraper.settings import PROXY_DATA | |
import logging | |
class ProxySpider(scrapy.Spider): | |
name = 'proxy' | |
allowed_domains = ['sslproxies.org'] |
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
let lat = null; // place Your Latitude Value here | |
let lng = null; // place Your Longitude Value here | |
const YOUR_KEY = null; // place Your API Key here | |
$.get('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + lat + ", " + lng + '&key=' + YOUR_KEY, function (data) { | |
if (data['status'] === "OK") { | |
let result = data['results'][0].address_components; | |
let street, city, state, postal_code, area = ""; | |
for (let i = 0; i < result.length; i++) { | |
let type_of_param = result[i].types[0]; | |
let long_name = result[i].long_name; |