Skip to content

Instantly share code, notes, and snippets.

View bars3s's full-sized avatar
πŸ’β€β™‚οΈ
πŸ¦‹

bars3s bars3s

πŸ’β€β™‚οΈ
πŸ¦‹
View GitHub Profile
@bars3s
bars3s / jquery.widget.lib.js
Created October 3, 2012 09:12
Library for simplify work with jquery widget
(function ($) {
var W = $.Widget;
/**
* Shortcut for $.proxy(func,this)
* @param {Function} func
* @return {Function}
*/
W.prototype._proxy = function (func) {
@bars3s
bars3s / nginx.conf
Last active December 2, 2022 21:04
nginx image resizer with size parameters in query string
# Example: test.com/images/cats.jpeg?w=100&h=100
location ~* ^/images/(.+\.(?:jpe?g|png|gif))$ {
set $image_name $1;
set $demins "${arg_w}x${arg_h}";
set $check_str "${demins}";
# check that original size file exists
if ( -f $request_filename ) {
set $check_str "${check_str}F1";
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.scrollable {
overflow-y: scroll;
}
<a href="https://www.ietf.org/rfc/rfc4288.txt">open</a><br/>
<a href="https://www.ietf.org/rfc/rfc4288.txt" download>download</a>