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 / Json Text
Created April 22, 2012 19:55
JSON Object retrieved using api.moviedb.com
[
{
"score": null,
"popularity": 3,
"translated": true,
"adult": false,
"language": "en",
"original_name": "Masculin feminin",
"name": "Masculin feminin",
"alternative_name": "Masculin féminin oder: Die Kinder von Marx und Coca Cola",
@bkvirendra
bkvirendra / error.html
Created April 24, 2012 19:11
Twitter like Error Page effect
<html>
<head>
<title>Error</title>
<style>
html {
background:-moz-radial-gradient(center center , ellipse farthest-corner, rgb(71, 134, 179) 0%, rgb(46, 86, 115) 100%) no-repeat fixed 0% 0% transparent;
}
</style>
</head>
<body>
@bkvirendra
bkvirendra / suggest
Created April 29, 2012 13:15
Google Suggest URL
http://suggestqueries.google.com/complete/search?json&client=firefox&q=virendra&hl=en
@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)
)
<?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 / 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
));
$params = array(
'scope' => 'email',
'redirect_uri' => ' ' // Add your Redirect URI Here
);
$loginUrl = $facebook->getLoginUrl($params);
@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;
@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);
}