Skip to content

Instantly share code, notes, and snippets.

🤓
Reading your blog posts

Šime Vidas simevidas

🤓
Reading your blog posts
Block or report user

Report or block simevidas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5930986

Articles about flexbox:

View encoding.html
<head>
<script>document.write('<meta charset="utf-8">')</script>
</head>
<body>
<script>
document.body.innerHTML += "";
</script>
</body>
@simevidas
simevidas / gist:6612409
Last active Dec 23, 2015
Poll: Code blocks in blog posts
View gist:6612409
View gist:6640655
// Page 3
document.addEventListener('DOMContentLoaded', function init() {
var testD = document.querySelector('#testDetails');
var summary = testD.querySelector('summary');
summary.addEventListener('click', function () {
var open = !testD.hasAttribute('open');
console.log(open);
View gist:6708899
<script>
if (screen.width <= 640) document.write('<meta name="viewport" content="width=device-width, initial-scale=1">');
</script>
View gist:7407373
<script>
(function () {
google.maps.event.addDomListener(window, 'load', init);
var map;
function init() {
var mapOptions = {
center: new google.maps.LatLng(45.8167,15.9833),
zoom: 2,
View perfect-plugin.html
<!doctype html>
<html>
<head>
<title>Tabs Demo!</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.container {
margin-top: 20px;
}
@simevidas
simevidas / gist:8272443
Last active Jan 2, 2016
Creating the MongoDB URL in a Node web app on AppFog
View gist:8272443
// This is my refactored version of the code available in AppFog’s documentation here:
// https://docs.appfog.com/services/mongodb#node
// The version string is passed to the IIFE as an argument ('mongodb2-2.4.8' in my case)
var mongourl = (function (mongo_version) {
var VCAP = process.env.VCAP_SERVICES;
var obj = VCAP ? JSON.parse(VCAP)[mongo_version][0].credentials : {};
return [
View gist:9302143
"Exception caught during observer callback: @data:text/javascript;base64,CiAgICBQb2x5bWVyKCdwb2x5bWVyLXNlbGVjdG9yJywgewogICAgICAvKioKICAgICAgICogR2V0cyBvciBzZXRzIHRoZSBzZWxlY3RlZCBlbGVtZW50LiAgRGVmYXVsdCB0byB1c2UgdGhlIGluZGV4CiAgICAgICAqIG9mIHRoZSBpdGVtIGVsZW1lbnQuCiAgICAgICAqCiAgICAgICAqIElmIHlvdSB3YW50IGEgc3BlY2lmaWMgYXR0cmlidXRlIHZhbHVlIG9mIHRoZSBlbGVtZW50IHRvIGJlCiAgICAgICAqIHVzZWQgaW5zdGVhZCBvZiBpbmRleCwgc2V0ICJ2YWx1ZWF0dHIiIHRvIHRoYXQgYXR0cmlidXRlIG5hbWUuCiAgICAgICAqCiAgICAgICAqIEV4YW1wbGU6CiAgICAgICAqCiAgICAgICAqICAgICA8cG9seW1lci1zZWxlY3RvciB2YWx1ZWF0dHI9ImxhYmVsIiBzZWxlY3RlZD0iZm9vIj4KICAgICAgICogICAgICAgPGRpdiBsYWJlbD0iZm9vIj48L2Rpdj4KICAgICAgICogICAgICAgPGRpdiBsYWJlbD0iYmFyIj48L2Rpdj4KICAgICAgICogICAgICAgPGRpdiBsYWJlbD0iem90Ij48L2Rpdj4KICAgICAgICogICAgIDwvcG9seW1lci1zZWxlY3Rvcj4KICAgICAgICoKICAgICAgICogSW4gbXVsdGktc2VsZWN0aW9uIHRoaXMgc2hvdWxkIGJlIGFuIGFycmF5IG9mIHZhbHVlcy4KICAgICAgICoKICAgICAgICogRXhhbXBsZToKICAgICAgICoKICAgICAgICogICAgIDxwb2x5bWVyLXNlbGVjdG9yIGlkPSJzZWxlY3RvciIgdmFsdWVhdHRyPSJsYWJ
View transition-flex
// Hey! Listen!
// The above slide animation is transition:flex.
// No hard-coded px/% width values!
@media (min-width: 800px)
.services
display flex
.services__item
flex 1
transition flex .25s ease-in-out .1s
You can’t perform that action at this time.