Skip to content

Instantly share code, notes, and snippets.

View Ivanopalas's full-sized avatar

Ivan Ivanopalas

  • Aksalan
  • Donetsk
View GitHub Profile
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
@Ivanopalas
Ivanopalas / jQuery Tabs Short
Last active July 9, 2018 14:17
jQuery Tabs Short
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
=e($name)
@at-root &_#{$name}
@content
=m($name)
@at-root &-#{$name}

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

// The basic check
if(document.readyState === 'complete') {
// good to go!
}
// Polling for the sake of my intern tests
var interval = setInterval(function() {
if(document.readyState === 'complete') {
clearInterval(interval);
done();
$(function() {
scrolllinks = $("a[href^=#]"),
scrolllinks.click(function(e){
var shref = $(this).attr("href"),
offTop = shref === "#" ? 0 : $(shref).offset().top;
$('html, body').stop().animate({
scrollTop: offTop
}, 500);
e.preventDefault();
});
@Ivanopalas
Ivanopalas / scifi.html
Last active January 20, 2016 10:15 — forked from anonymous/scifi.html
Задание для https://goo.gl/WGrXbu
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Sci-Fi</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://fb.me/react-0.14.3.js"></script>
<script src="https://fb.me/react-dom-0.14.3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
</head>
.container {
height: 0;
padding-bottom: 20%;
position: relative;
}
.container div {
border: 2px dashed #ddd;
height: 100%;
left: 0;
@Ivanopalas
Ivanopalas / scopes.txt
Created June 8, 2016 07:06 — forked from iambibhas/scopes.txt
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
$tablet-width: 768px;
$desktop-width: 1200px;
$xl-desctop-width: 1800px;
@mixin tablet {
@media (min-width: #{$tablet-width}) and (max-width: #{$desktop-width - 1px}) {
@content;
}
}