This file contains 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
<?php | |
/** | |
* Create Site map | |
* | |
* @category Model | |
* @author Md. Sirajus Salayhin <[email protected]> | |
* | |
*/ |
This file contains 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
$browsers = array( | |
'firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', | |
'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol' | |
); | |
if (isset($_SERVER['HTTP_USER_AGENT'])) { | |
$browser['useragent'] = $_SERVER['HTTP_USER_AGENT']; | |
$user_agent = strtolower($browser['useragent']); | |
foreach($browsers as $_browser) { |
This file has been truncated, but you can view the full file.
This file contains 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
-- phpMyAdmin SQL Dump | |
-- version 3.4.10.1deb1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: May 16, 2013 at 12:29 PM | |
-- Server version: 5.5.29 | |
-- PHP Version: 5.4.12-2~precise+1 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
This file contains 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
<select name="Country"> | |
<option value="" selected="selected">Select Country</option> | |
<option value="United States">United States</option> | |
<option value="United Kingdom">United Kingdom</option> | |
<option value="Afghanistan">Afghanistan</option> | |
<option value="Albania">Albania</option> | |
<option value="Algeria">Algeria</option> | |
<option value="American Samoa">American Samoa</option> | |
<option value="Andorra">Andorra</option> | |
<option value="Angola">Angola</option> |
This file contains 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
<?php | |
/** | |
* Author Md. Sirajus Salayhin <[email protected]> | |
* Class for parsing number | |
*/ | |
class Parser | |
{ |
This file contains 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
<table align="center" style="width: 600px; height: auto; margin: 20px auto 0;"> | |
<tr> | |
<td> | |
<a href="https://www.staff.com/"><img alt="Image" src="https://www.staff.com/newsletter/headerAugust.png"></a> | |
</td> | |
</tr> | |
<tr> | |
<td> | |
<img alt="Image" src="https://www.staff.com/newsletter/titleAugust.png"> | |
</td> |
This file contains 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
# encoding: utf-8 | |
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
before_filter :authenticate_user!, only: :stripe_connect | |
def facebook | |
auth = request.env['omniauth.auth'] | |
@user = User.where(auth.slice('provider', 'uid')).first | |
if @user.present? | |
sign_in(@user, event: :authentication) |
This file contains 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/bash | |
if ! hash git &> /dev/null || ! hash php &> /dev/null; then | |
echo -e " *****\n ***** INSTALLING GIT AND PHP\n *****" | |
if hash apt-get &> /dev/null; then | |
sudo apt-get install git-core php5-cli php5-curl | |
elif hash port &> /dev/null; then | |
sudo port install php5-curl | |
elif hash fink &> /dev/null; then |
This file contains 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 urllib | |
from BeautifulSoup import * | |
url = raw_input('Enter - ') | |
html = urllib.urlopen(url).read() | |
soup = BeautifulSoup(html) | |
# Retrieve all of the anchor tags | |
tags = soup('span') |
This file contains 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
# Note - this code must run in Python 2.x and you must download | |
# http://www.pythonlearn.com/code/BeautifulSoup.py | |
# Into the same folder as this program | |
import urllib | |
from BeautifulSoup import * | |
position = raw_input('Enter Position - ') | |
count = raw_input('Enter Count - ') |
OlderNewer