This file contains hidden or 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
$(window).scroll(function(){ | |
if ($(window).scrollTop() == $(document).height() - $(window).height()){ | |
// calling the function to get the ajax data | |
loadMore(); | |
} | |
}); | |
function loadMore() { | |
$.ajax({ | |
url: base_url + "/infscroll/get_inf_scroll_ajax", |
This file contains hidden or 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
$('.tab').click(function() { | |
$(this).show(); | |
var eventCategory = jQuery(this).attr('data-category'); | |
var eventAction = jQuery(this).attr('data-action'); | |
var eventLabel = window.document.title; | |
_gaq.push(['_trackEvent', eventCategory, eventAction, eventLabel]); | |
}); |
This file contains hidden or 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
function getTweets($hash_tag) { | |
$url = 'http://search.twitter.com/search.atom?q='.urlencode($hash_tag) ; | |
echo "<p>Connecting to <strong>$url</strong> ...</p>"; | |
$ch = curl_init($url); | |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
$xml = curl_exec ($ch); | |
curl_close ($ch); | |
//If you want to see the response from Twitter, uncomment this next part out: |
This file contains hidden or 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
<div class="example-class<?php echo ($xyz++%2); ?>"> |
This file contains hidden or 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
<!doctype html> | |
<html lang="en" ng-app="anim"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Test page</title> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular.min.js"></script> | |
<script> | |
var anim = angular.module('anim', []); | |
anim.controller('MainCtrl', ['$scope', function ($scope) { |
This file contains hidden or 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
<script> | |
var t0 = window.performance.now(); | |
</script> | |
<script> | |
var t1 = window.performance.now(); | |
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.") | |
</script> |
This file contains hidden or 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
stages: | |
- test | |
# Variables: these have to match | |
# the .env.example credentials in your Laravel app | |
# use the default homestead/secret combination, since | |
# that database gets created in the edbizarro/gitlab-ci-pipeline-php:7.1 | |
# docker image. | |
variables: | |
MYSQL_ROOT_PASSWORD: root |
This file contains hidden or 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
# Installing Apache, PHP and MySQL | |
sudo apt install -y apache2 | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get update | |
sudo apt install -y zip unzip git curl | |
sudo apt-get install -y php7.3-fpm php7.3-cli php7.3-gd php7.3-mysql \ | |
php7.3-mbstring php7.3-xml php7.3-curl \ | |
php7.3-bcmath php7.3-sqlite3 php7.3-zip |
This file contains hidden or 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
# Basics | |
sudo apt-get update | |
sudo apt-get install -y git tmux vim curl wget zip unzip htop | |
# Nginx | |
sudo apt-get install -y nginx | |
# PHP | |
sudo add-apt-repository ppa:nginx/stable | |
sudo add-apt-repository -y ppa:ondrej/php |
This file contains hidden or 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 | |
/** | |
* Portable PHP password hashing framework. | |
* @package phpass | |
* @since 2.5.0 | |
* @version 0.3 / WordPress | |
* @link http://www.openwall.com/phpass/ | |
*/ | |
# |
OlderNewer