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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Routing an unknown number of sub-levels | |
|-------------------------------------------------------------------------- | |
| | |
| This is how you can route an unknown number of sub-levels and pass them | |
| to the same controller. For example, the following URLs will go through | |
| the same route: | |
| |
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
/* | |
|-------------------------------------------------------------------------- | |
| At least one column must have a value | |
|-------------------------------------------------------------------------- | |
| | |
| This is a simple pair of triggers for MySQL databases that will disallow | |
| a row to be inserted into a table unless at least one of two predefined | |
| columns has a value set. | |
| | |
*/ |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| PHP - Font Awesome Icon Helper | |
|-------------------------------------------------------------------------- | |
| | |
| A helper function to build the HTML for a Font Awesome icon with all of | |
| the recommended accessibility tags. | |
| | |
*/ |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5 - Route must start with @ | |
|-------------------------------------------------------------------------- | |
| | |
| A quick snippet showing use of the Route::where(); method that lets you | |
| define a regex pattern for the route to match, such as the "@" symbol | |
| at the beginning to denote a user. | |
| |
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
server { | |
server_name www.yourdomain.com; | |
return 301 $scheme://yourdomain.com$request_uri; | |
} |
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
operation = {4, '+', 6, '-', 2} | |
function calculate(...) | |
local tbl={...} | |
if tbl[2] then | |
if tbl[2]=='+' then | |
table.insert(tbl, 1, tbl[1] + tbl[3]) | |
table.remove(tbl, 2) | |
table.remove(tbl, 3) | |
table.remove(tbl, 4) |
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 | |
class atelier801Forums { | |
public $session, $hiddenKey; | |
function __construct($user, $pass){ | |
$this->session = new Requests_Session("http://atelier801.com/"); | |
$this->setHeaders(); | |
$this->GET("http://atelier801.com/forums"); | |
$fields = array( |
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
<button class="btn btn-primary" data-hover-content="Goodbye world"> | |
Hello world | |
</button> | |
<button class="btn btn-primary" data-hover-element="#elementContent"> | |
Button Content | |
</button> | |
<div id="elementContent" style="display:none;"> | |
Element Content | |
</div> |
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
/* | |
|-------------------------------------------------------------------------- | |
| Card Stack | |
|-------------------------------------------------------------------------- | |
| | |
| Adds a visual effect to make an element looks like there are multiple | |
| stacks of it. Uses white background and gray border, used for Bootstrap | |
| 4 cards. | |
| | |
*/ |
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
/* entire container, keeps perspective */ | |
.flip-container { | |
perspective: 1000px; | |
} | |
/* flip speed goes here */ | |
.flipper { | |
transition: 0.6s; | |
transform-style: preserve-3d; |
OlderNewer