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
eventsActions.before('removeOne', function(nextCallback, actionBody) { | |
console.log("Removing event"); | |
var jsonEvent = JSON.stringify(actionBody); | |
jQ.ajax({ | |
type: 'POST', | |
dataType: 'json', | |
contentType: 'application/json', |
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
authentify: (user) -> | |
deferred = $.Deferred() | |
$.ajax( | |
type: 'POST' | |
url: '/auth/register' | |
data: view.model.toJSON() | |
success: (data) => | |
console.log "I am in succes??" | |
deferred.resolve() |
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
5th Novembver 2014 in Thunock (name of the City, I might mispelled the word), | |
near the London, during changing the drive lane I hit another car. | |
BMW brand, registration number ND10PFX. | |
This accident took place on M24 road. | |
I drove in Renault Premium, registration number P0704vj. | |
Accident was my fault because I did not see the BMW vehicle in my mirrors. | |
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 namespace App\Http\Middleware; | |
use App; | |
use Closure; | |
use Illuminate\Contracts\Routing\Middleware; | |
class MyMiddleware implements Middleware { | |
/** | |
* Handle an incoming request. |
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
public function index() | |
{ | |
$query = Input::get('q'); | |
if(!$query) { | |
return View::make('search.index'); | |
} | |
list($listings, $searchedCoords) = $this->searchRepository->findByQuery($query, true); |
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
#-*- coding: utf-8 -*- | |
from pyquery import PyQuery as pq | |
import MySQLdb | |
db = MySQLdb.connect(host="localhost", user="someuser", | |
passwd="somepassword", db="somedatabase", charset='utf8') | |
c = db.cursor() | |
# It explains itself | |
# Of course we can dig it from forum "programmaticaly", |
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
for x in `git status | grep deleted | awk '{print $3}'`; do git rm $x; done |
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
/* | |
* loadSimpleFileToArray | |
* | |
* what the function does | |
* | |
* @param (String) path to the source file | |
* @return (Array) | |
*/ | |
function loadSimpleFileToArray($fileName) | |
{ |
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
UPDATE | |
database1.table D1, | |
database2.table D2 | |
SET D1.email=D2.email | |
WHERE D1.domain=D2.domain AND D1.email IS NULL AND D2.email <>''; | |
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 | |
/* | |
* Very nice and usefull! | |
*/ | |
@forelse ($users as $user) | |
{{ $user->name }} | |
@empty | |
<p>There are no users.</p> | |
@endforelse |