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
[ | |
{ | |
"name":"Lonesome Ridge Trail", | |
"id":1001, | |
"distance":4.5, | |
"difficulty":3, | |
"observations":[ | |
{ | |
"elevation":[ | |
291.65263635636268, |
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
// MARK: Phantom types | |
protocol Person { | |
var name: String { get set } | |
var position: String { get set } | |
func formatTitle() -> String | |
} | |
struct BasePerson<Character>: Person { |
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
{ | |
"contants": { | |
"a": 100, | |
"b": 200 | |
}, | |
"formulae": { | |
"formula1": "a+b" | |
}, | |
"steps": [ | |
// step 1 |
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
Загородный ресторан %Название ресторана% – меню и цены на сайте! | |
20 мин. от Белгорода. Вкусные блюда и уютная атмосфера в ресторане "%Название ресторана%". Бронируйте! | |
Ресторан в Белгороде | |
Организация банкетов, свадеб и праздников в банкетном комплексе Салют! | |
Ресторан «%Название ресторана%» – Банкеты от 10 до 100 человек | |
Свадьба, корпоратив. Аренда зала бесплатно. | |
Ресторан в Белгороде на Конева! – «%Название ресторана%»! |
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
adduser {name} | |
sudo apt-get update | |
sudo apt-get install nodejs | |
sudo apt-get install npm | |
sudo npm install n -g | |
sudo n latest | |
node -v | |
sudo npm install pm2 -g |
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
Формирование ссылки для авторизации | |
echo 'https://telegram.me/vkfollowersbot?start='.substr(sh1($_REQUEST['viewer_id'] . 'fonov'), 6).$_REQUEST['viewer_id'] | |
Что мы делаем? | |
Берем vk id как СТРОКУ!!! и прибавляем к ней 'fonov' | |
ХЭШ от строки, первые 6 символов | |
И прибовляем к ней ид вк. | |
Ссылка Аркадия | |
https://telegram.me/vkfollowersbot?start=366717170147312 |
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
// Это конструкция для того что бы обновить если есть, если нет то создать запись | |
collection.update({page: 'unicorns'}, {$inc: {hits: 1}}, {upsert: true}, (err, result) => { | |
}); |
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
protorunMenu(menuData, stop){ | |
if(typeof menuData.title == 'undefined') | |
throw Error('titleis not set') | |
if(typeof menuData.menu == 'undefined') | |
throw Error('menu is not set') | |
const message = '<b>'+menuData.title+'</b>'+((typeof menuData.message == 'undefined') ? '' : '\n'+menuData.message) | |
var keyboard = [], | |
action = {} |