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 | |
/** | |
* JSON Web Token implementation | |
* | |
* Minimum implementation used by Realtime auth, based on this spec: | |
* http://self-issued.info/docs/draft-jones-json-web-token-01.html. | |
* | |
* @author Neuman Vong <[email protected]> | |
*/ | |
class JWT |
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"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo</title> | |
<style> | |
#arrow-container { | |
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4EAAACwCAYAAACxZGtZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkNDM0UwMkU1M0MyODExRTY4MjBFQjQxRUM0NkU3MTAzIiB4bXBNTTpEb2N1bWVudElEPSJ4 |
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
#!/usr/local/bin/perl -w | |
use CGI qw(:standard); | |
use CGI::Carp qw(fatalsToBrowser set_message); | |
my $q = CGI->new; | |
my $filename = '/gsa/a23gsa/.projects/p1/aheweb23/projects/wwwstage/content/innovation/cn/like/db.txt'; | |
my $like = 0; | |
print $q->header('text/plain'); | |
# Read like count and plus one |
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
SetEnvIf X-Forwarded-Proto https HTTPS=on |
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
//Learn more: https://github.com/cloudant/nodejs-cloudant | |
//Before querying, you need to create index first | |
var Cloudant = require('cloudant'); | |
var cloudant = Cloudant({account: 'ACCOUNT', key: 'API-KEY', password: 'PASSWORD'}); | |
var db = cloudant.db.use('DB1'); | |
var index_user = {name:'user', type:'json', index:{fields:['user']}} | |
db.index(index_user, function(er, response) { | |
if (er) throw er; | |
console.log('Index creation result: %s', response.result); |
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
1. SSH by own ID | |
2. su | |
(paste root password) | |
3. mysql -u root -p | |
(paste mysql root password) | |
4. CREATE DATABASE MY_SITE; | |
5. CREATE USER 'MY_SITE'@'localhost' IDENTIFIED BY 'MY_PASSWORD'; | |
6. GRANT ALL PRIVILEGES ON MY_SITE . * TO 'MY_SITE'@'localhost'; | |
7. FLUSH PRIVILEGES; | |
8. wget https://wordpress.org/latest.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
<div class="grid12-4"> | |
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-middle-caption-position1')->toHtml(); ?> | |
<?php echo $this->getLayout()->createBlock('ultimo/product_list_featured') | |
->setData('category_id', '37') | |
->setData('product_count', '8') | |
->setData('breakpoints', '[0, 1]') | |
->setData('timeout', '4000') | |
->setData('centered', '1') | |
->setData('size', 'size-s') | |
->setData('hide_button', '0') |
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 echo Mage::getSingleton('core/design_package')->getPackageName(); ?> |
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 | |
// Download PHPExcel from: https://github.com/PHPOffice/PHPExcel before run this code | |
include 'PHPExcel-1.8/Classes/PHPExcel/IOFactory.php'; | |
$inputFileName = './Book1.xls'; | |
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName); | |
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); | |
var_dump($sheetData); |
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"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Drag & Drop Upload and Parse Spreadsheet(xls, xlsx)</title> | |
</head> | |
<body> | |
<style> | |
#dropZone { |