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
#Author: Arockia | |
"""Use this script to monitor the price of products from Amazon and get alert when there is a fall in price.""" | |
import urllib, requests, codecs, datetime, os,smtplib | |
from email.mime.text import MIMEText | |
import BeautifulSoup | |
filename="ProductPriceHistory.txt" |
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
#!/usr/env/ python | |
#Author: Arockia | |
"""Use this script to monitor the price of products from Amazon and get alert when there is a fall in price.""" | |
import urllib, requests, codecs, datetime, os | |
from bs4 import BeautifulSoup | |
filename="ProductPriceHistory.txt" |
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
#Get Logical Parition usage in percentage | |
#Written by Arockia | |
Get-WmiObject win32_logicaldisk -Filter "DriveType=3" | select DeviceID,Size,Freespace | Format-Table -Property DeviceID,@{name="Total_Space";expression={[math]::Round(($_.Size/1MB)/1024,2).ToString()+" GB"}},@{name="Free_Space";expression={[math]::Round(($_.Freespace/1MB)/1024,2).ToString()+" GB"}}, @{name="Usage Percentage";expression={[math]::Round(((([math]::Round(($_.Size/1MB)/1024,2)-[math]::Round(($_.Freespace/1MB)/1024,2))/[math]::Round(($_.Size/1MB)/1024,2))*100),2).ToString()+" %"}} -AutoSize |
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
Import-Module ActiveDirectory | |
$days = 7 | |
$users = Search-ADAccount -AccountExpiring -TimeSpan (New-TimeSpan -Days $days) | |
$op="" | |
foreach($usr in $users) | |
{ | |
$current_user = Get-ADUser $usr.SamAccountName -Properties Manager,mail,userprincipalname,AccountExpires,DisplayName | |
if ($current_user.userprincipalname -ne $null) | |
{ | |
$user_mail = $current_user.userprincipalname |
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
import requests | |
from bs4 import BeautifulSoup | |
import subprocess | |
import threading | |
import pynotify | |
import sys | |
top_stories_url=“http://timesofindia.indiatimes.com/” | |
top_stories_req = requests.get(top_stories_url) |
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/sh | |
cd /usr/local/share | |
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2 | |
tar -xjf /usr/local/share/phantomjs-1.9.0-linux-i686.tar.bz2 | |
sudo ln -sf /usr/local/share/phantomjs-1.9.0-linux-i686/bin/phantomjs /usr/local/bin/phantomjs | |
git clone git://github.com/n1k0/casperjs.git /usr/local/src/casperjs | |
cd /usr/local/src/casperjs | |
git checkout tags/1.0.2 | |
ln -sf /usr/local/src/casperjs/bin/casperjs /usr/local/bin/casperjs |