Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
borodutch.com

Nikita Kolmogorov backmeupplz

💭
borodutch.com
View GitHub Profile
@backmeupplz
backmeupplz / download.js
Created May 17, 2020
Todorant Mobile upload and download scripts to localize.todorant.com
View download.js
const dotenv = require('dotenv')
dotenv.config({ path: `${__dirname}/../.env` })
const axios = require('axios')
const fs = require('fs')
;(async function getTranslations() {
console.log('==== Getting localizations')
const translations = (
await axios.get('https://localizer.todorant.com/localizations?tag=mobile')
).data.filter((l) => {
@backmeupplz
backmeupplz / download.js
Created May 17, 2020
Todorant Telegram bot upload and download scripts to localize.todorant.com
View download.js
const dotenv = require('dotenv')
dotenv.config({ path: `${__dirname}/../.env` })
const axios = require('axios')
const unflatten = require('flat').unflatten
const fs = require('fs')
const jsyaml = require('js-yaml')
;(async function getTranslations() {
console.log('==== Getting localizations')
const translations = (
@backmeupplz
backmeupplz / download.js
Created May 17, 2020
Todorant frontend upload and download scripts to localize.todorant.com
View download.js
const dotenv = require('dotenv')
dotenv.config({ path: `${__dirname}/../.env` })
const axios = require('axios')
const unflatten = require('flat').unflatten
const fs = require('fs')
;(async function getTranslations() {
console.log('==== Getting localizations')
const translations = (
await axios.get('https://localizer.todorant.com/localizations?tag=web')
View TodorantUITests.swift
//
// TodorantUITests.swift
// TodorantUITests
//
// Created by Nikita Kolmogorov on 2020-03-21.
// Copyright © 2020 Facebook. All rights reserved.
//
import XCTest
@backmeupplz
backmeupplz / AppTest.java
Created May 7, 2020
Todorant screengrab test
View AppTest.java
package com.todorant;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import org.junit.Rule;
import org.junit.ClassRule;
import org.junit.Test;
import tools.fastlane.screengrab.Screengrab;
View gist:f65d424300b3fa1496df6456acb71e39
<WebView
source={{
uri: 'https://todorant.com/mobile-login/telegram',
}}
/>
View public.ts
import { Controller, Get } from 'koa-router-ts'
import { Context } from 'koa'
@Controller('/')
export default class {
@Get('/')
async facebook(ctx: Context) {
ctx.body = "Cool cool cool cool, noice"
}
}
View gist:6ddcb19679a7708ebac1b46683fb426d
User:
messages: [Message]
Message:
text: String
type: MessageType
response?: Response
enum MessageType: ['non_interactive', 'multiple_choice', 'date_picker']
View gist:76a424b02a9979c384cba65eea8652c9
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 16.0 %
Temp: 24.0 C Humidity: 18.0 %
Temp: 24.0 C Humidity: 17.0 %
Temp: 24.0 C Humidity: 17.0 %
Temp: 24.0 C Humidity: 17.0 %
View gist:15ca13d392b69282049b6b196fd56096
import sys
import Adafruit_DHT
while True:
humidity, temperature = Adafruit_DHT.read_retry(11, 4)
print 'Temp: {0:0.1f} C Humidity: {1:0.1f} %'.format(
temperature, humidity)