Skip to content

Instantly share code, notes, and snippets.

View infernalmaster's full-sized avatar
😻
Working from home

Rostyslav Diachok infernalmaster

😻
Working from home
View GitHub Profile
# unicorn_rails -c /srv/myapp/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
working_directory (rails_env == 'production' ? "/srv/myapp/current" : `pwd`.gsub("\n", ""))
worker_processes (rails_env == 'production' ? 10 : 4)
preload_app true
timeout 30
if rails_env == 'production'
// IMPORTANT
//I modified touch sliding events handling
//cause chrome had some issue with that
//So be careful when updating this file
// from line 1730-1771 and line 33
/*!
* sly 1.0.1 - 8th Jun 2013
* https://github.com/Darsain/sly
*
module Searchable
extend ActiveSupport::Concern
module ClassMethods
def configure_search_params config_hash
@config_hash = config_hash
end
@mixin cover-background( $path ) {
background-image: url( $path );
@include background-size( cover );
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $path + "', sizingMethod='scale')";
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='#{$path}', sizingMethod="scale");
}

Data Types

ValueType - simple String or Object:

  • value - String | Number
  • format - Integer | Array of Integer
  • precision - Integer | Array of Integer
  • caption - String

Three.JS Cubes

@infernalmaster
infernalmaster / WebsitePerformanceOptimization.md
Last active August 7, 2017 12:05
Оптимізація швидкості завантаження сайту
  1. редагувати дизайн і викинути все зайве:

  2. розробляти сайт з фокусом на швидкість завантаження:

require 'benchmark'
require 'net/http'
def page_size
Net::HTTP.get(URI.parse('https://www.google.com/')).size
end
puts Benchmark.measure {
(0..3).map do
response = page_size
@infernalmaster
infernalmaster / settings.js
Last active November 22, 2018 21:45
VSCODE config
{
// main part for eslint
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"eslint.autoFixOnSave": true,
// disable default vscode format, because it may conflict with eslint
"javascript.validate.enable": false,
// and some other useful settings
{
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react",
"prettier"
],
"plugins": [
"prettier"
],