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 sprintf(format) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
var i = 0; | |
return format.replace(/%s/g, function() { | |
return args[i++]; | |
}); | |
} |
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
/** | |
* Keyframes. | |
* Create a named animation sequence that can be applied to elements later. | |
* | |
* Usage: | |
* @include keyframes(fly) { | |
* from { | |
* transform: rotate(0deg); | |
* } | |
* to { |
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
#!/bin/sh | |
for file in *.png ; do pngcrush "$file" "${file%.png}-crushed.png" && mv "${file%.png}-crushed.png" "$file" ; done |
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 | |
use Carbon\Carbon; | |
use Illuminate\Validation\Validator; | |
class CustomValidator extends Validator { | |
# carbon_date_format # | |
public function validateCarbonDateFormat($attribute, $value, $parameters) |
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
clear | |
curdir="${0%/*}" | |
uglifyjs -v \ | |
$curdir/jquery/jquery.js \ | |
$curdir/twbs/js/bootstrap.js \ | |
$curdir/superfish/superfish.js \ | |
$curdir/site/js/site.js \ | |
-o $curdir/../../js/app.js \ | |
-m | |
echo 'JS files compiled successfully!' |
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
<snippet> | |
<content><![CDATA[ | |
Event::listen('illuminate.query', function($sql) {dd($sql);}); | |
]]></content> | |
<tabTrigger>sql</tabTrigger> | |
<scope>source.php</scope> | |
</snippet> |
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 { | |
border: 1px solid rgba(0, 0, 0, 0.25); | |
border-radius: 2px; | |
color: #444; | |
margin: 0px 5px; | |
min-height: 29px; | |
min-width: 65px; | |
-webkit-user-select: none; | |
padding: 8px 13px; | |
/* iOS does not support linear-gradient without a prefix. */ |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme", | |
"detect_slow_plugins": false, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"font_size": 11, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"ignored_words": |
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
/// <summary> | |
/// Return the full name of an entity. | |
/// </summary> | |
public String FullName() | |
{ | |
get | |
{ | |
return String.Join(" ", new String[] { this.FirstName, this.MiddleName, this.LastName, this.SecondLastName }); | |
} | |
} |
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
for (var i = 0; i < list.Count; i++) | |
{ | |
var first = i == 0; | |
var last = i == list.Count - 1; | |
var current = i + 1; | |
var previous = i; | |
if (first || previous % 3 == 0) | |
{ | |
@Html.Raw("<div class=\"row\">"); |