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
/** | |
* Отформатировать телефонный номер. | |
* | |
* Для мобильных код отбивается пробелами, для домашних — скобками. | |
* | |
* Грамотно обрабатываются только русские номера, | |
* для остальных функция пытается отформатировать более-менее нормально. | |
* | |
* Для отбивания цифр используются не просто дефисы, а специальные цифровые чёрточки, не хухры. | |
* |
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
{ | |
"continents": [ | |
{ | |
"name": "Africa", | |
"countries": [ | |
{ | |
"name": "Angola", | |
"phone": "244", | |
"native": "Angola", | |
"capital": "Luanda" |
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
matrix: | |
include: | |
- os: osx | |
podfile: ios/Podfile | |
language: objective-c | |
osx_image: xcode12 | |
cache: | |
yarn: true | |
cocoapods: true |
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
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
open /Applications/Xcode.app |
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
#!/bin/bash | |
# Stop cached listeners | |
watchman watch-del-all | |
# Remove installed modules | |
rm -rf node_modules | |
# Remove yarn meta files | |
rm yarn* |
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
/* | |
Given the array of IDs, which contains many duplicate integers | |
and one unique integer, find the unique integer. | |
*/ | |
// O(n^2): loop in loop | |
function find_unique_brute (array) { | |
var result = null, n = array.length; |
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
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
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
\documentclass[a4paper]{article} | |
\usepackage[russian]{babel} | |
\usepackage[utf8]{inputenc} % UTF-8 | |
\usepackage{tikz} % include TikZ | |
\usetikzlibrary{mindmap, trees, shadows} % TikZ library | |
\usepackage{verbatim} | |
\usepackage[left=2cm,right=2cm, | |
top=2cm,bottom=2cm,bindingoffset=0cm]{geometry} | |
\usepackage{color} % you may define RGB colors |
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 'i18n' | |
LOCALE = 'ru' | |
module Jekyll | |
module I18nFilter | |
def localize(input, format=nil) | |
load_translations | |
format = (format =~ /^:(\w+)/) ? $1.to_sym : format | |
I18n.l input, :format => format, :locale => LOCALE |
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
--- | |
layout: none | |
sitemap: | |
priority: 1.0 | |
changefreq: weekly | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
{% for post in site.posts %} | |
<url> |
NewerOlder