Skip to content

Instantly share code, notes, and snippets.

<?php
$ch = curl_init("http://turizm.verstka.uz/new.zip");
$fp = fopen("new.zip", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
video
position: fixed
top: 50%
left: 50%
min-width: 100%
min-height: 100%
width: auto
height: auto
z-index: -100
transform: translateX(-50%) translateY(-50%)
.navbar-toggle
position: absolute
right: 0
top: 10px
border: none
padding: 10px 7px
background-color: transparent
background-image: none
&:focus
$('.navbar-toggle').click(function(e) {
$(this).toggleClass('active');
$('.navbar-collapse').toggleClass('active');
e.preventDefault();
});
@Shoyad
Shoyad / keymap
Created July 23, 2016 01:34
Atom php emmet support
'atom-text-editor[data-grammar="text html php"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
@Shoyad
Shoyad / scale video img or div
Created July 7, 2016 03:40
scale height page
scaleVideoContainer();
initBannerVideoSize('main .poster');
initBannerVideoSize('.video-container .filter');
initBannerVideoSize('main video');
$(window).on('resize', function() {
scaleVideoContainer();
scaleBannerVideoSize('.video-container .poster');
scaleBannerVideoSize('.video-container .filter');
<?php
$url = 'http://www.example.com/a-large-file.zip';
$path = '/path/to/a-large-file.zip';
$fp = fopen($path, 'w');
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fp);
$data = curl_exec($ch);
body{
position: relative;
}
body::before {
background: url("filename") no-repeat center center;
background-size: cover;
content: ' ';
height: 100%;
left: 0;
position: fixed;