- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream icon { | |
server unix:/home/icon/web/site.ru/icon/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name site.ru www.site.ru; | |
rewrite ^(.+)$ https://site.ru$uri permanent; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream site { | |
server unix:/home/site/web/site.com.ua/site/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name site.com.ua www.site.com.ua; | |
rewrite ^(.+)$ https://site.com.ua$uri permanent; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FilterService | |
def initialize(params) | |
@products = Good.all | |
@models = Model.all.order(position: :asc) | |
@brands = Brand.all.order(position: :asc) | |
@types = TypesTechnology.all.order(position: :asc) | |
@type = params[:type] || nil | |
@brand = params[:brand] || nil | |
@model = params[:model] || false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FilterService | |
def initialize(params) | |
@products = Product.all | |
@category = params[:category] || false | |
@style = params[:style] || false | |
@scale = params[:scale] || false | |
@min = params[:min] || false | |
@max = params[:max] || false | |
@sort = params[:sort] || '' | |
@page = params[:page] || 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest} from '@angular/common/http'; | |
import {Observable} from 'rxjs/Observable'; | |
import { environment } from "../../../../environments/environment"; | |
@Injectable() | |
export class APIHttpInterceptor implements HttpInterceptor { | |
private baseUrl: string = environment.API_BASE_URL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client | |
nobind | |
dev tun | |
redirect-gateway def1 | |
<key> | |
-----BEGIN RSA PRIVATE KEY----- | |
приватный ключ | |
-----END RSA PRIVATE KEY----- | |
</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LANG=ru_RU.UTF-8 | |
LC_MESSAGES=ru_RU.UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseDMS = (dmsString) -> | |
dmsString = dmsString.trim() | |
dmsRe = /([NSEW])?(-)?(\d+(?:\.\d+)?)[°º:d\s]?\s?(?:(\d+(?:\.\d+)?)['’‘′:]\s?(?:(\d{1,2}(?:\.\d+)?)(?:"|″|’’|'')?)?)?\s?([NSEW])?/i | |
result = {} | |
m1 = undefined | |
m2 = undefined | |
decDeg1 = undefined | |
decDeg2 = undefined | |
dmsString2 = undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pageWidth = window.innerWidth || document.body.clientWidth; | |
var treshold = Math.max(1, Math.floor(0.01 * (pageWidth))); | |
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
const limit = Math.tan(45 * 1.5 / 180 * Math.PI); | |
const gestureZone = document.getElementById('sidebar_swipe'); |
OlderNewer