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 config = { | |
apiKey: "<API_KEY>", | |
authDomain: "<PROJECT_ID>.firebaseapp.com", | |
databaseURL: "https://<DATABASE_NAME>.firebaseio.com", | |
}; | |
firebase.initializeApp(config); | |
var database = firebase.database(); | |
var notesRef = database.ref('notes'); |
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
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | |
<html> | |
<head> | |
<STYLE TYPE="text/css"> | |
A:LINK { color: #000000; | |
font-weight: none; | |
text-decoration: none; } | |
A:VISITED { color: #000000; |
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 | |
// app/global.php | |
require app_path().'/events.php'; | |
// app/events.php | |
Event::listen('student.change', function() { | |
Cache::forget('query.student.all'); | |
}) | |
// app/models/Student.php |
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ /public/$1 [L] |
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 | |
$services_json = json_decode(getenv("VCAP_SERVICES"),true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
?> |
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
// Will fire an alert if user presses the "F" key twice within 300 miliseconds | |
var dblCtrlKey = 0; | |
$(document).keydown(function(e) { | |
if (dblCtrlKey != 0 && e.which == 70) { | |
alert("Ok double F"); | |
} else { | |
dblCtrlKey = setTimeout('dblCtrlKey = 0;', 300); | |
} | |
}); |
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 | |
$services_json = json_decode(getenv("VCAP_SERVICES"),true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
$db['default']['hostname'] = $mysql_config['hostname']; | |
$db['default']['username'] = $mysql_config['user']; | |
$db['default']['password'] = $mysql_config['password']; | |
$db['default']['database'] = $mysql_config['name']; | |
$db['default']['port'] = $mysql_config['port']; |
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
/* Retina Display */ | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and (min-device-pixel-ratio: 2) { | |
/* YOUR CSS HERE */ | |
} |
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
# Modify UserAgent | |
NSUserDefaults.standardUserDefaults.registerDefaults({UserAgent: "my-custom-user-agent-name"}) |