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
- Opera/9.80 (iPhone; Opera Mini/5.0.0176/764; U; en) Presto/2.4.15 |
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 _savetw() | |
{ | |
$conf = config_item('twapps'); | |
$params = array('consumer_key' => $conf['key'], 'consumer_secret' => $conf['secret']); | |
$this->load->library('twitter', $params ); | |
/* Get temporary credentials. */ | |
$this->session->set_userdata('twitter', $request_token = $this->twitter->getRequestToken()); // getRequestToken(base_url('startrek/auth/twitter_callback')) | |
switch ($this->twitter->http_code) | |
{ |
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 type="text/javascript"> | |
var require = { | |
baseUrl: "/scripts/", | |
waitSeconds: 15, | |
urlArgs : "bust="+{{buildNumber}}, | |
deps : ['app/main'] | |
}; | |
</script> | |
<script src="/scripts/require.js?bust={{buildNumber}}"></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
<script type="text/javascript"> | |
function detectMobile () { | |
var agent = navigator.userAgent.toLowerCase(); | |
var result = false; | |
if (!!(agent.match(/(iPad|android|SCH-I|xoom|NOOK|silk|kindle|GT-P|touchpad|kindle|sch-t|viewpad|bolt|playbook)/i))) { | |
result = true; | |
} | |
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(agent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560| |
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
var deviceType = (function(){ | |
var phone = { | |
'iPhone' : /(iPhone.*Mobile|iPod|iTunes)/i, | |
'BlackBerry' : /BlackBerry|rim[0-9]+/i, | |
'HTC' : /HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6425|001HT|Inspire 4G/i, | |
'Nexus' : /Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile/, | |
// @todo: Is 'Dell Streak' a tablet or a phone? ;) | |
'Dell' : /Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/i, | |
'Motorola' : /Motorola|\bDroid\b.*Build|DROIDX|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITA |
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 ($) { | |
$(function () { | |
function update() { | |
var width = $(document).width(); | |
var height = $(document).height(); | |
$('.modal-fluid').css({ | |
width: width * 0.8, | |
marginLeft: -(width * 0.4) | |
}); | |
$('.modal-fluid .modal-body').css({ |
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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
/** | |
* CodeIgniter Template Class | |
* | |
* Build your CodeIgniter pages much easier with partials, breadcrumbs, layouts and themes | |
* | |
* @package CodeIgniter | |
* @subpackage Libraries | |
* @category Libraries |
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
/* | |
setting config .. kcfinder/config.php | |
domain.com/files | |
$referer = @parse_url($_SERVER['HTTP_REFERER']); | |
$scheme = isset($referer['scheme']) ? $referer['scheme'] : 'http'; | |
$_CONFIG = array( | |
'uploadURL' => $scheme.'://'.$_SERVER['HTTP_HOST'].'/files', |
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
/** | |
* Simple asset preloader class. | |
* | |
* @dependency: delegate | |
*/ | |
function Preloader( assets, callback ) { | |
this.assets = assets; | |
this.asset = null; | |
this.assetIndex = 0; | |
this.callback = callback; |
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 timestampFromSeconds( s ) { | |
hours = parseInt( s / 3600 ) % 24; | |
minutes = parseInt( s / 60 ) % 60; | |
seconds = s % 60; | |
result = minutes+":"+(seconds < 10 ? "0" + seconds : seconds); | |
return result; | |
} |