Skip to content

Instantly share code, notes, and snippets.

View agriboz's full-sized avatar
🎹
Working from anywhere

Can Agriboz agriboz

🎹
Working from anywhere
View GitHub Profile
$(window).load(function(){
var images = ['bg1', 'bg2', 'bg3'];
var imageRandom = Math.floor( Math.random() * images.length );
var imagesUrl = 'url(../img/' + images[imageRandom] + '.jpg)';
$('body').css('background-image', imagesUrl);
});
@agriboz
agriboz / text-line.css
Created August 13, 2013 08:09
Creating paper effect ??
p { line-height: 1.2;
background-image: linear-gradient(rgba(0,0,0,0.3) 1px, transparent 1px);
background-size: 100% 1.2em;
background-position: 0 0.8;
font-size: 170%;
padding: 1em;
background-origin: content-box;
}
<?php
$tempCSS = $HTTP_GET_VARS["cssfile"];
if ($tempCSS != "") {
$loadCSS = $tempCSS;
} else {
/* sets a default CSS file if no querystring specified */
$loadCSS = "default.css";
};
$currentDesign = $loadCSS;
@agriboz
agriboz / SassMeister-input-HTML.html
Created December 23, 2014 13:26
Generated by SassMeister.com.
<nav class="nav-collapse">
<ul class="nav-collapse">
<li><a href="#">Home</a></li>
<li><a href="#">Bilder</a></li>
<li><a href="#">Rezepte</a></li>
<li><a href="#">Blog</a></li>
</ul>
<a href"#" id="pull">Menu</a>
</nav>
angular.module('utils.filters', [])
.filter('removeAccents', removeAccents);
function removeAccents() {
return function (source) {
var accent = [
/[\300-\306]/g, /[\340-\346]/g, // A, a
/[\310-\313]/g, /[\350-\353]/g, // E, e
/[\314-\317]/g, /[\354-\357]/g, // I, i
/[\322-\330]/g, /[\362-\370]/g, // O, o
@agriboz
agriboz / omit.js
Created July 13, 2020 09:06 — forked from dfkaye/omit.js
omit.js removes array items that match every key-value in a descriptor
// 12 July 2020
// prompted by Cory House tweet
// @see https://twitter.com/housecor/status/1282375519481323520
function omit(array, descriptor) {
// Return the input if it's not an array, or if the descriptor is not an Object.
if (!Array.isArray(array) || descriptor !== Object(descriptor)) {
return array;
}