Skip to content

Instantly share code, notes, and snippets.

View raihanba13's full-sized avatar

raihanba13

View GitHub Profile
import paramiko
host_name = "****"
user_name = "****"
password = "****"
try:
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_client.connect(hostname=host_name, port=22, username=user_name, password=password)
import os
import sys
os.chdir('O:/python-code/gdrive_upload/')
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
#print(os.getcwd())
try:
<html lang="en" class="version-d platform-desktop">
<head>
<meta charset="UTF-8">
<title>WhatsApp Group Invite</title>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@whatsapp" />
<meta property="og:title" content="groupchat :)"/>
<meta property="og:image" content="https://www.cdn.whatsapp.net/img/whatsapp-promo-simple.png"/>
<meta property="og:site_name" content="WhatsApp.com"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
@raihanba13
raihanba13 / dropdown.css
Created March 3, 2018 02:37 — forked from YoSmudge/dropdown.css
Pure HTML/CSS Dropdown Select Menu
/*Add cursor to the spans and labels*/
form .mycssdropdown li label, form .mycssdropdown li label span{
cursor:pointer;
}
/*By default, hide the spans*/
form .mycssdropdown li label span{
display:none;
}
@raihanba13
raihanba13 / password_hash_example.php
Created July 11, 2017 14:19 — forked from jeremykendall/password_hash_example.php
Example of password hashing and verification with password_hash and password_verify. This script is intended to be run from the command line like so: 'php -f password_hash_example.php'
<?php
/**
* Example of password hashing and verification with password_hash and
* password_verify
*
* This script is intended to be run from the command line
* like so: 'php -f password_hash_example.php'
*
* @see http://stackoverflow.com/a/20809916/1134565
@raihanba13
raihanba13 / device1.php
Created April 22, 2017 17:09
Home automation project
<?php
$status1 = file_get_contents("device1.txt");
echo $status1;
?>
@raihanba13
raihanba13 / device1.py
Created April 22, 2017 17:06
Home automation project
#This is the simplest code. I used headers from documentation and tried SO answers https://docs.python.org/3.4/howto/urllib2.html#headers
import RPi.GPIO as GPIO
import urllib2
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(3,GPIO.OUT)
true = 1
while(true):
try:
response = urllib2.urlopen('http://mydomain.com/device1.php')