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
{ | |
"name": "laravel/laravel", | |
"description": "The Laravel Framework.", | |
"keywords": ["framework", "laravel"], | |
"license": "MIT", | |
"require": { | |
"laravel/framework": "4.1.*", | |
"darsain/laravel-console": "dev-master", | |
"anonoz/fb-php-sdk-laravel-session": "dev-master", | |
"way/database" : "dev-master" |
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 os | |
from xlutils.copy import copy | |
from xlrd import open_workbook | |
from xlwt import Utils | |
import json | |
base_path = os.path.dirname(os.path.realpath(__file__)) | |
file_path = base_path+'/eds_form.xls' | |
desti_path = base_path+'/final.xls' | |
raw_dump = base_path+'/export.json' |
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
private function generateCacheKey($request) | |
{ | |
$path = $request->getPathInfo(); | |
$content = $request->getContent(); | |
return 'app:'.sha1($path.$content); | |
} |
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 | |
class NewRelic | |
{ | |
public static function __callStatic($method, $params) | |
{ | |
if (!extension_loaded('newrelic')) { | |
return null; | |
} |
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
$route = Router::route(Request::method(), URI::current()); | |
$delegate = array_get($route->action, 'uses'); | |
$reflector = new ReflectionClass('Controller'); | |
$method = $reflector->getMethod('references'); | |
$method->setAccessible(true); | |
$d = $delegate; | |
$p = $route->parameters; | |
$method->invokeArgs(null, [&$d, &$p]); |
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 ng-table="tableParams" template-pagination="pagination" template-header="header" show-filter="false" class="table"> | |
.. | |
<script type="text/ng-template" id="header"> | |
<ul class="btn-group pagination ng-table-pagination"> | |
<li ng-class="{'disabled': !page.active}" ng-repeat="page in pages" ng-switch="page.type"> | |
<a class="btn btn-xs btn-default" ng-switch-when="prev" ng-click="params.page(page.number)" href="">«</a> | |
<a class="btn btn-xs btn-default" ng-switch-when="first" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> | |
<a class="btn btn-xs btn-default" ng-switch-when="page" ng-click="params.page(page.number)" href=""><span ng-bind="page.number"></span></a> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<script type="application/javascript"> | |
var options = { | |
autoplay: true, //to stop autoplay of the video, make this false | |
facebookPixelId: '<your fb pixel id>', //put your facebook pixel id here | |
customEvent: false, //do you want to track this as a custom event, put it here | |
height: '390', //height of the video within quotes | |
width: '640', //width of the video within quotes | |
videoId: 'M7lc1UVf-VE', //id of the video within quotes | |
injectionProgress: 50 //the progress of the video that needs to trigger fb pixel | |
}; |
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
<script type="text/javascript"> | |
var options = { | |
facebookPixelId: '45454545454', | |
customEvent: false, | |
injectionProgress: 50 | |
}; | |
$(document).ready(function(){ var timer; var player; var injected = false; $('iframe').each(function(){ var ele = $(this); if (ele.attr('id').indexOf('fitvid') < 0) { return; } var video = ele; var id = video.attr('id'); var src = video.attr('src') + '&enablejsapi=1'; video.attr('src', src); video.load(function(){ player = new YT.Player(id, { events: { 'onStateChange': onPlayerStateChange } }); }); function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING) { var playerTotalTime = player.getDuration(); timer = setInterval(function() { var playerCurrentTime = player.getCurrentTime(); var playProgress = Math.ceil((playerCurrentTime / playerTotalTime) * 100); if (playProgress > options.injectionProgress && !injected) { if (!injected) { var eventData; if (options.customEvent !== false) { eventData = options.customEvent + '&cd[progress]='+ playProgress; } els |
OlderNewer