Skip to content

Instantly share code, notes, and snippets.

View lisovskyvlad's full-sized avatar

Lisovskii Vladislav lisovskyvlad

View GitHub Profile
@joepie91
joepie91 / vpn.md
Last active June 18, 2024 07:25
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
-- paste into http://elm-lang.org/try and click "compile"
-- http://imgur.com/gallery/W6TwgZw
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Text
import Color exposing (..)
import Time
import Signal
@Ptico
Ptico / gems.rb
Created October 6, 2015 14:42
My default rails gemfile
source 'https://rubygems.org'
BUNDLE_RAILS_VERSION = '~> 4.2.4'
# Rails
gem 'railties', BUNDLE_RAILS_VERSION
gem 'activesupport', BUNDLE_RAILS_VERSION
gem 'actionpack', BUNDLE_RAILS_VERSION
gem 'actionmailer', BUNDLE_RAILS_VERSION
gem 'activejob', BUNDLE_RAILS_VERSION
@iAdramelk
iAdramelk / .md
Last active June 4, 2024 05:34
Длинная телега про Бутстрап

Английская версия: https://evilmartians.com/chronicles/bootstrap-an-intervention

Вводная часть

У CSS есть несколько базовых проблем, которые позволяют очень быстро отстрелить себе ногу при неправильном использовании:

  1. Глобальный неймспейс – в серверном программировании все что написано в файле, в файле и остается. Все же что написано в css и js засирает глобальное пространство имен со всеми вытекающими. В JS эту проблему сейчас побороли всякими модульными системами, а вот с css сложнее. В идеальном мире это должен починить Shadow DOM и настоящие Web Components, но пока их нет единственный способ с этим бороться – следовать какой-то системе именований селекторов, которая по возможности уменьшает и исключает возможные конфликты.

  2. Каскадность – если на один элемент может сработать несколько правил, то они все и сработают последовательно. Если есть элемент h1.title, на него сработают все правила для тегов h1 и все правила для класса .title. Так как весь html состоит из тегов, то правил которые п

@olegantonyan
olegantonyan / crud_responder.rb
Last active October 4, 2015 10:21
CrudResponder - DRYing controller actions. Now in gem https://github.com/olegantonyan/crud_responder
# lib/crud_responder.rb
module CrudResponder
include ActionView::Helpers::TextHelper
protected
def crud_respond(object, options = {})
method = options.fetch(:method, method_by_caller(caller))
success_url = options.fetch(:success_url) { default_redirect_url(method, object) }
error_action = options.fetch(:error_action) { default_render_action(method, object) }
@mistakster
mistakster / webpack.config.js
Created July 9, 2015 16:23
Webpack configuration file
/**
* Build for production:
* $ NODE_ENV=production webpack
*
* Build for staging or development mode
* $ webpack
*
* Run app server in dev mode and use Hot Module Replacement
* $ NODE_ENV=webpack nodemon --watch ./app index.js
*
class window.Gallery
speed: 200
move_speed: 400
preload: true
current_page: 0
reversed: false
constructor: (element) ->
@element = $(element)
@rgaidot
rgaidot / docker-resources.md
Last active October 22, 2023 13:02
Docker Resources All In One - A collection of docker online resources
@vast
vast / gulpfile.coffee
Created February 24, 2015 18:49
gulp & postcss integration
gulp = require "gulp"
gutil = require "gulp-util"
plumber = require "gulp-plumber"
app_config = require "../config/application"
postprocessors = require "../config/postcss"
gulp.task "stylesheets", ["clean:stylesheets"], ->
gulp.src(app_config.paths.main_stylesheet)
.pipe(plumber())