Skip to content

Instantly share code, notes, and snippets.

View bkvirendra's full-sized avatar
🎯
Focusing

Viren Rajput bkvirendra

🎯
Focusing
View GitHub Profile
@bkvirendra
bkvirendra / gist:2823272
Created May 29, 2012 08:21
Invite Friends
var x=document.getElementsByTagName("input");for(var i=0;i<x.length;i++) {if (x[i].type == 'checkbox') {x[i].click();}}; alert('Done, all your friends have been selected');
@bkvirendra
bkvirendra / Fullpage.html
Created May 20, 2012 21:01
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Facebook Like Alert &middot; CodePen</title>
<style>
@bkvirendra
bkvirendra / Fullpage.html
Created May 20, 2012 21:00
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Facebook Like Alert &middot; CodePen</title>
<style>
@bkvirendra
bkvirendra / notifications.js
Created May 13, 2012 13:45
Facebook Like Alert Notifications JS
function alert(textToshow, timeToShow) {
$("#alertText").html(textToshow);
$("#alert").fadeIn(1000, function() {
$("#alertText").fadeIn(700);
});
setTimeout(function() {
hideAlert();
}, timeToShow);
}
@bkvirendra
bkvirendra / alert.css
Created May 13, 2012 13:30
Facebook Like Alert Notifications
#alert{
position:fixed;
display:none;
left:50%;
margin-left:-300px;
bottom:120px;
width:600px;
text-align:center;
height:auto;
background:#eee;
$params = array(
'scope' => 'email',
'redirect_uri' => ' ' // Add your Redirect URI Here
);
$loginUrl = $facebook->getLoginUrl($params);
@bkvirendra
bkvirendra / fbconfig.php
Created May 10, 2012 21:34
oauth config
require 'src/facebook.php';
require 'db/functions.php';
$facebook = new Facebook(array(
'appId' => ' ', // Add your APP ID here
'secret' => ' ', // Add your App secret here
));
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', ' '); // Your DB Username goes here
define('DB_PASSWORD', ' '); // Your DB PassWord Goes here
define('DB_DATABASE', ' '); // The name of the DB goes here
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
?>
@bkvirendra
bkvirendra / signups.sql
Created May 10, 2012 15:39
signups table
CREATE TABLE signups
(
id INT PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(70),
uid VARCHAR(200),
username VARCHAR(100)
)
@bkvirendra
bkvirendra / signups.sql
Created May 10, 2012 15:39
signups table
CREATE TABLE signups
(
id INT PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(70),
uid VARCHAR(200),
username VARCHAR(100),
);