Skip to content

Instantly share code, notes, and snippets.

View wingsline's full-sized avatar
😃

Arpad Olasz wingsline

😃
View GitHub Profile
@wingsline
wingsline / LESS border-radius.less
Created October 5, 2012 00:16
LESS: Border radius mixin
.border-radius(@val) {
-webkit-border-radius: @val;
-moz-border-radius: @val;
border-radius: @val;
}
@wingsline
wingsline / LESS: box-shadow.less
Created October 5, 2012 00:18
LESS: box-shadow mixin
.box-shadow (...) {
box-shadow: @arguments;
-moz-box-shadow: @arguments;
-webkit-box-shadow: @arguments;
-o-box-shadow: @arguments;
}
@wingsline
wingsline / LESS: background-size.less
Created October 5, 2012 00:19
LESS: background-size mixin
.background-size (...) {
background-size:@arguments;
-webkit-background-size: @arguments;
}
@wingsline
wingsline / LESS: button-gradient.less
Created October 5, 2012 00:21
LESS: button gradient mixin
.button-gradient (@start, @end) {
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, @start), color-stop(1, @end) );
background: -webkit-linear-gradient(top, @start 5%, @end 100% );
background: -moz-linear-gradient(top, @start 5%, @end 100% );
background: -o-linear-gradient(top, @start 5%, @end 100% );
background: -ms-linear-gradient(top, @start 5%, @end 100% );
background: linear-gradient(top, @start 5%, @end 100% );
background-color: @start;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{start}', endColorstr='@{end}');
}
@wingsline
wingsline / media-queries.css
Created October 5, 2012 00:31
handheld and low resolution media queries
/* low resolutions */
@media only screen and (max-width: 1023px) {
}
/* handheld */
@media handheld, only screen and (max-width: 767px) {
}
@wingsline
wingsline / HTML: 1px transparent gif.html
Created October 5, 2012 16:36
1px transparent gif
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
@wingsline
wingsline / SASS: ms background size mixin.scss
Created October 7, 2012 19:48
Scales the bg to the element size
// scales the bg to the element size
@mixin ms-bgsize ($bg)
{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='#{$bg}',sizingMethod='scale');
-ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='#{$bg}',sizingMethod='scale');
background-image: none;
}
@wingsline
wingsline / SASS ms background gradient mixin.scss
Created October 7, 2012 19:53
SASS ms background gradient mixin
// simple ms gradient
@mixin ms-gradient ($start, $end) {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie_hex_str($start)},endColorstr=#{ie_hex_str($end)});
-ms-filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#{ie_hex_str($start)}', EndColorStr='#{ie_hex_str($end)}');
}
@wingsline
wingsline / UUID.php
Created December 26, 2012 19:04 — forked from dahnielson/UUID.php
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4211 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@wingsline
wingsline / laravel:sqlite_regexp.php
Created January 3, 2013 05:54
Laravel: SQLite REGEXP
// create the function
DB::connection()->pdo->sqliteCreateFunction("REGEXP", "preg_match", 2);
// build a query
DB::table('tablename')->raw_where('REGEXP("#^[a-z]+$#iu", tablename.row)')->get();