-
Open Terminal
Ctrl+Alt+T
Download Firefox Developer Editiontar file
wget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US
-
Copy tar file to
opt
sudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2
-
Open
opt
folder (cd /opt/
) and untar filesudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2
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 slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
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
/* | |
* Original script by: Shafiul Azam | |
* Version 4.0 | |
* Modified by: Luigi Balzano | |
* Description: | |
* Inserts Countries and/or States as Dropdown List | |
* How to Use: | |
In Head section: |
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
// Extra big for Twitter Bootstrap | |
@media screen and (min-width: 1400px) { | |
.container { | |
width: 1370px; | |
} | |
} | |
@media screen and (min-width: 1600px) { | |
.container { | |
width: 1570px; |
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|
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
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
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
.pagination{height:36px;margin:0;padding: 0;} | |
.pager,.pagination ul{margin-left:0;*zoom:1} | |
.pagination ul{padding:0;display:inline-block;*display:inline;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)} | |
.pagination li{display:inline} | |
.pagination a{float:left;padding:0 12px;line-height:30px;text-decoration:none;border:1px solid #ddd;border-left-width:0} | |
.pagination .active a,.pagination a:hover{background-color:#f5f5f5;color:#94999E} | |
.pagination .active a{color:#94999E;cursor:default} | |
.pagination .disabled a,.pagination .disabled a:hover,.pagination .disabled span{color:#94999E;background-color:transparent;cursor:default} | |
.pagination li:first-child a,.pagination li:first-child span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px} | |
.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0; |
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 | |
/* Simple sample USSD registration application | |
* USSD gateway that is being used is Africa's Talking USSD gateway | |
*/ | |
// Print the response as plain text so that the gateway can read it | |
header('Content-type: text/plain'); | |
/* local db configuration */ | |
$dsn = 'mysql:dbname=dbname;host=127.0.0.1;'; //database name |
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
defmodule Randomizer do | |
@moduledoc """ | |
Random string generator module. | |
""" | |
@doc """ | |
Generate random string based on the given legth. It is also possible to generate certain type of randomise string using the options below: | |
* :all - generate alphanumeric random string | |
* :alpha - generate nom-numeric random string |
OlderNewer