Skip to content

Instantly share code, notes, and snippets.

View renarsvilnis's full-sized avatar
🌊

Renārs Vilnis renarsvilnis

🌊
View GitHub Profile
@renarsvilnis
renarsvilnis / gist:6e8c455663f3601f9f1c
Last active August 29, 2015 14:19
Tips for web app security
@renarsvilnis
renarsvilnis / php-tricks-n-tips.md
Last active August 29, 2015 14:17
Some tips or useful info about PHP that i found interesting or useful at the moment of writing.
@renarsvilnis
renarsvilnis / read-length-of-mp3.php
Last active August 29, 2015 14:11
Read length of mp3
<?php
ini_set("max_execution_time", "30000");
// how much detail we want. Larger number means less detail
// (basically, how many bytes/frames to skip processing)
// the lower the number means longer processing time
define("DETAIL", 5);
define("DEFAULT_WIDTH", 500);
@renarsvilnis
renarsvilnis / css-tricks-n-tips.md
Last active August 29, 2015 14:06
Usefull tricks and tips which i gain from working on projects

TIPS

  • If parent has overflow hidden and child has backface-visibility: hidden; then fonts on chrome <= 37 render blurry due to the are converted to and image upscaled.

FONTS

@renarsvilnis
renarsvilnis / _remove-focus-color.scss
Last active August 29, 2015 14:01
Sass mixing for removing focus color
// mixin for easy focus color removement
@mixin remove-focus-color {
outline: none;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); /* mobile webkit */
}
@renarsvilnis
renarsvilnis / _png-svg-fallback.scss
Last active August 29, 2015 14:01
Sass png-svg fallback
// sass svg fallback to png (or your desired extension)
// similar to other fallbacks but this supports < 4 firefox
@mixin png-svg-fallback($url, $extension: '.png') {
background-image: url($url + $extension);
background-image: -webkit-linear-gradient(transparent, transparent), url($url + ".svg");
background-image: linear-gradient(transparent, transparent), url($url + ".svg");
}