Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Java minded

Victor Mikhaylov vm137

💭
Java minded
View GitHub Profile
@vm137
vm137 / webdev_online_resources.md
Created Aug 8, 2018 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
View webdev_online_resources.md
@vm137
vm137 / gist:d34571851165d5c88a806d92b1ce7c1c
Created May 31, 2018 — forked from lxneng/gist:741932
install PostgreSQL 9 in Mac OSX via Homebrew
View gist:d34571851165d5c88a806d92b1ce7c1c
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@vm137
vm137 / protips.js
Created Nov 3, 2017 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
View protips.js
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
View CSS Retina support
#myimage {
width: 400px;
height: 300px;
background: url(lo-res.jpg) 0 0 no-repeat;
}
@media
screen and (-webkit-min-device-pixel-ratio: 1.5),
screen and (-moz-min-device-pixel-ratio: 1.5),
screen and (min-device-pixel-ratio: 1.5) {
View JS isRetina
var isRetina = (
window.devicePixelRatio > 1 ||
(window.matchMedia && window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)").matches)
);
View Featured Display Banner CSS3
View Paper Page Curl Effect
ul.box {
position: relative;
z-index: 1; /* prevent shadows falling behind containers with backgrounds */
overflow: hidden;
list-style: none;
margin: 0;
padding: 0;
}
ul.box li {
View Github Fork Ribbon 45 deg
.ribbon {
background-color: #a00;
overflow: hidden;
/* top left corner */
position: absolute;
left: -3em;
top: 2.5em;
/* 45 deg ccw rotation */
-moz-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
View Chess Pattern CSS3
body {
background-color: white;
background-image: linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black),
linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);
background-size: 100px 100px;
background-position: 0 0, 50px 50px;
}
View Tooltip Hovers CSS
a {
border-bottom:1px solid #bbb;
color:#666;
display:inline-block;
position:relative;
text-decoration:none;
}
a:hover,
a:focus {
color:#36c;