- Устанавливаем Windows 10. Необходима сборка (build) 14942 и выше (узнать можно, выполнив команду
winver
). Если установлена более старая сборка:Settings > Update & Security > Windows Insider Program
(подключаемся к программе, нужен аккаунт Microsoft).- Попросит перезагрузиться ( у меня пару раз просил, только потом раздуплился ), после чего появится переключатель
Choose your insider level
- выбираемFast
. - Идём в
Settings > Update & Security > Windows Updates > Check for update
. Смотрим, нашёл ли он обновление до новой сборки (этот шаг у меня занял сутки. Microsoft раздуплился только на следующий день и выдал мне обновление). - После того, как будет установлена нужная сборка, можно отключить Windows Insider Program, либо поставить переключалку с
Fast
наSlow
, дабы что-нибудь внезапно не сломалось.
- Включаем режим разработчика: `Settings
This file contains 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
find . -name '*.*' ! -type d -exec bash -c 'expand -t 2 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; |
This file contains 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
# It might seem like we should more correctly reject these sequences in | |
# the encoder, and I would personally agree, but the sad reality is that | |
# we do not distinguish binary and textual data in our language, and so we | |
# wind up with the same thing - a string - containing both. | |
# | |
# That leads to the position where we must treat these invalid sequences, | |
# which are both legitimate binary content, and illegitimate potential | |
# attacks on the system, as something that passes through correctly in | |
# a string |
This file contains 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
#=require jquery | |
$(document).on 'change blur', "form[data-autosubmit] :input, .autosubmit:input, form[data-autosubmit] textarea", ()-> | |
if $(@).parents('form [type=submit]').count > 0 | |
$(@).parents('form [type=submit]').click() | |
else | |
$(@).parents('form').trigger('submit') |
This file contains 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
defmodule MyModule.ArrayCombination do | |
def combination(_, 0), do: [[]] | |
def combination(list, n) when (length(list) < n), do: [] | |
def combination(list, n) when (length(list) == n), do: [list] | |
def combination(list, 1), do: Enum.map(list, fn(x)-> [x] end) | |
def combination([head|tail], n) do | |
Enum.map(combination(tail, n-1), fn(x)-> [head|x] end) ++ combination(tail, n) | |
end |
This file contains 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
%div{ style: 'display: none;' } | |
%input{ type: 'file', id: 'uploadImageInput' } |
This file contains 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
services: | |
rails: | |
from: ruby:2.1.2 | |
cache: | |
- /bundle | |
- /app/public/assets | |
- /app/public/uploads | |
build: | |
- apt-get update | |
- apt-get install -y libqt4-dev pkg-config |
This file contains 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
require 'bcrypt' | |
module Encryptor | |
def digest(password) | |
::BCrypt::Password.create(password, cost: 3).to_s | |
end | |
module_function :digest | |
def compare(encrypted_password, password) | |
return false if encrypted_password.blank? |
This file contains 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
#=require jquery | |
$(document).on 'change', "form[data-autosubmit] :input, .autosubmit:input, form[data-autosubmit] textarea", ()-> | |
if $(@).parents('form [type=submit]').count > 0 | |
$(@).parents('form [type=submit]').click() | |
else | |
$(@).parents('form').trigger('submit') | |
$(document).on 'blur', "form[data-autosubmit] textarea, form[data-autosubmit] :input", ()-> | |
if $(@).parents('form [type=submit]').count > 0 |
NewerOlder