Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
function file_exists_ci($file) { | |
if (file_exists($file)) | |
return $file; | |
$lowerfile = strtolower($file); | |
foreach (glob(dirname($file) . '/*') as $file) | |
if (strtolower($file) == $lowerfile) |
using Coherent.UI; | |
using Coherent.UI.Binding; | |
namespace MyGame | |
{ | |
class Options | |
{ | |
public bool SetWindowSize(int width, int height); | |
} | |
#lo sauer, 2013 - www.lsauer.com | |
#see: http://www.lsauer.com/2013/05/mysql-fuzzy-searching-fulltext-queries.html | |
#Note: In MySQL SUBSTRING, the string-index starts at position 1 | |
SELECT * FROM tablename | |
WHERE SOUNDEX(tablename_field) | |
LIKE CONCAT('%',SUBSTRING(SOUNDEX('Fuzti serch derm'),2),'%'); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Prerequisites:
Software components used:
<?php | |
App::uses('FormHelper', 'View/Helper'); | |
/** | |
* BootstrapFormHelper. | |
* | |
* Applies styling-rules for Bootstrap 3 | |
* | |
* To use it, just save this file in /app/View/Helper/BootstrapFormHelper.php | |
* and add the following code to your AppController: |
<?php | |
/* | |
* Plugin Name: Paulund WP List Table Example | |
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
* Plugin URI: http://www.paulund.co.uk | |
* Author: Paul Underwood | |
* Author URI: http://www.paulund.co.uk | |
* Version: 1.0 | |
* License: GPL2 | |
*/ |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
<?php | |
App::uses('Model', 'Model'); | |
App::uses('String', 'Utility'); | |
class AppModel extends Model { | |
/** | |
* @author Reed Dadoune | |
* distanceQuery |
public function beforeFilter() { | |
parent::beforeFilter(); | |
$this->response->header('Access-Control-Allow-Origin','*'); | |
$this->response->header('Access-Control-Allow-Methods','*'); | |
$this->response->header('Access-Control-Allow-Headers','X-Requested-With'); | |
$this->response->header('Access-Control-Allow-Headers','Content-Type, x-xsrf-token'); | |
$this->response->header('Access-Control-Max-Age','172800'); | |
} |