Skip to content

Instantly share code, notes, and snippets.


Vishnu vishnu1991

View GitHub Profile
vishnu1991 / facebook-messenger-bot.php
Created Dec 11, 2016 — forked from remmel/facebook-messenger-bot.php
Basic example of a Facebook Messenger Bot
View facebook-messenger-bot.php
// parameters
$hubVerifyToken = 'TOKEN123456abcd';
$accessToken = "xxx";
// check token at setup
if ($_REQUEST['hub_verify_token'] === $hubVerifyToken) {
echo $_REQUEST['hub_challenge'];
vishnu1991 / watermark.php
Last active Jan 24, 2017
Add watermark to jpg images php
View watermark.php
$bg_img='bg.jpg'; //path to background (JPG ext)
$logo_img='logo.png'; // path to logo (PNG ext.)
list($width_of_bg, $height_of_bg) = getimagesize($bg_img); // to calculate background image width and height
list($width_of_logo, $height_of_logo) = getimagesize($logo_img); //to calculate logo image width and height
//for bottom right
vishnu1991 / custom-domain-localhost-xampp
Created Jan 30, 2017 — forked from oozman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onwards are pretty much applicable on other operating system.
View custom-domain-localhost-xampp
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
View autocomplete.js
// This example displays an address form, using the autocomplete feature
// of the Google Places API to help users fill in the information.
$("#autocomplete").on('focus', function () {
var placeSearch, autocomplete;
var componentForm = {
street_number: 'short_name',
View gist:c2e449b520b7cdf2481583d3125c9afd
BFS(source, goal):
queue = empty new queue
if current == goal:
return path
if current in visited:
for direction, neighbour in graph[current]:
queue.append((path + direction, neighbour))
vishnu1991 / showspreadsheet.php
Created Apr 27, 2017 — forked from pamelafox/showspreadsheet.php
PHP for parsing the JSON output a published Google spreadsheet and displaying columns from each row.
View showspreadsheet.php
// Parsing this spreadsheet:
$url = '';
$file= file_get_contents($url);
$json = json_decode($file);
$rows = $json->{'feed'}->{'entry'};
foreach($rows as $row) {
echo '<p>';
View jd scrapper new 2018 python 3
from bs4 import BeautifulSoup
import urllib
import csv
def innerHTML(element):
return element.decode_contents(formatter="html")
def get_name(body):
return body.find('span', {'class':'jcn'}).a.string
View whatsapp get all my contacts
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
#driver = webdriver.Firefox()
driver = webdriver.Chrome()
View test.json
"type": "label",
"text": "refresh",
"action": {
"type": "$network.request",
"options": {
"url": ""
"success": {
"type": "$render"
View twitter.json
"$jason": {
"head": {
"title": "Twitter",
"styles": {
"note": {
"color": "#ffffff",
"font": "HelveticaNeue-Bold",
"size": "15"