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 | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\ActionController | |
Zend\Mvc\MvcEvent; | |
class IndexController extends ActionController | |
{ | |
public function indexAction() |
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
var myStore = new Ext.data.JsonStore({ | |
fields: ['Item1', 'Item2', 'Item3', 'Item4'] | |
, data: [] | |
, sortOnLoad: true | |
, sorters: { property: 'Item1', direction : 'DESC' } | |
}); |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
npm install formidable@latest |
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
module.exports = function(){ | |
switch(process.env.NODE_ENV){ | |
case 'development': | |
return {dev setting}; | |
case 'production': | |
return {prod settings}; | |
default: | |
return {error or other settings}; |
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
if (typeof(console) == 'undefined') { | |
var console = { | |
log: function(message) {}, | |
info: function(message) {}, | |
warn: function(message) {}, | |
error: function(message) { | |
alert(message); | |
} | |
} | |
} |
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
// # Twitter Bootstrap modal responsive fix by @niftylettuce | |
// * resolves #407, #1017, #1339, #2130, #3361, #3362, #4283 | |
// <https://github.com/twitter/bootstrap/issues/2130> | |
// * built-in support for fullscreen Bootstrap Image Gallery | |
// <https://github.com/blueimp/Bootstrap-Image-Gallery> | |
// **NOTE:** If you are using .modal-fullscreen, you will need | |
// to add the following CSS to `bootstrap-image-gallery.css`: | |
// | |
// @media (max-width: 480px) { |
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
function isTouchDevice() { | |
var el = document.createElement('div'); | |
el.setAttribute('ongesturestart', 'return;'); | |
return typeof el.ongesturestart === "function"; | |
} |
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
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL); | |
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined) { | |
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) { | |
// First time access has been granted, add the contact | |
}); | |
} | |
else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) | |
{ | |
// add the contact |
OlderNewer