Skip to content

Instantly share code, notes, and snippets.

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

Can Agriboz agriboz

🎹
Working from home
  • Berlin
  • 03:23 (UTC -12:00)
View GitHub Profile
@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;
}
img{
min-width: 100%;
height: auto;
}
.content{
position: absolute;
top: 0;
left: 0;
bottom: 0;
<?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 / 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;
}
$(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);
});
body {
background: #ccc51c;
min-height: 100%;
}
h1 {
position: absolute;
left: 50%;
margin-left: -1.9em;
color: hsla(0,0%,100%,.3);
/*Container*/
.container{
width:820px;
margin:30px auto;
padding:25px;
min-height:400px;
height:auto;
}
.container h2 { margin-top:30px;}
@agriboz
agriboz / markers.js
Last active December 13, 2015 23:59
Placing multiple markers on a google map
var markers = [
['Bondi Beach', -33.890542, 151.274856],
['Coogee Beach', -33.923036, 151.259052],
['Cronulla Beach', -34.028249, 151.157507],
['Manly Beach', -33.80010128657071, 151.28747820854187],
['Maroubra Beach', -33.950198, 151.259302]
];
function initializeMaps() {
var myOptions = {
@agriboz
agriboz / dabblet.css
Created November 9, 2012 13:59
Css Secrets "Lea Verou" Tip 4 Another Example
p { margin: 0; padding: 0; }
div { background-image: linear-gradient(black 1px, transparent 1px);
background-origin: content-box; /* İçeriğin başladığı alan */
background-size: 100% 1.5em;
background-position: 0 -.2em;
font-size: 120%;
line-height: 1.5;
width: 500px;
height: 500px;
font-family: Comic Sans MS;
@agriboz
agriboz / dabblet.css
Created November 9, 2012 13:54
Css Secrets "Lea Verou" Tip 4
p { margin: 0; padding: 0; }
div { background: linear-gradient(white 50%, beige 50%);
background-origin: content-box; /* İçeriğin başladığı alan */
background-size: 100% 3em; /*iki katı olması gerekiyor. line-height'in*/
font-size: 120%;
line-height: 1.5; /* background-size - 2 katı olmalı*/
}