Skip to content

Instantly share code, notes, and snippets.

View vovkasm's full-sized avatar

Vladimir Timofeev vovkasm

  • Self employed
  • Budva, Montenegro
View GitHub Profile
@vovkasm
vovkasm / mattermost-dl.py
Created August 9, 2024 21:00 — forked from RobertKrajewski/mattermost-dl.py
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json
@vovkasm
vovkasm / README.md
Last active November 6, 2019 11:34
Android build with additional dimensions (snippets)

Directory structure

dir structure

@vovkasm
vovkasm / sample.jsx
Created September 3, 2019 13:56
Poor RN text overflow behavior :-(
funciton MyComp() {
return (
<View style={{ flexDirection: 'row', borderColor: 'blue', borderWidth: StyleSheet.hairlineWidth }}>
<View style={{ width: 100, height: 100, backgroundColor: 'green' }} />
<Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultricies finibus elementum.</Text>
</View>
)
}
@vovkasm
vovkasm / out.txt
Created August 13, 2019 11:41
Properties of Mobx actions.
Increment without transaction
before incrementCounter cnt=0
after incrementCounter cnt=1
reaction computed=1
reaction cnt=1
Two increments with transaction
before incrementCounter cnt=1
after incrementCounter cnt=2
Current immediate value in transaction cnt=2
before incrementCounter cnt=2
@vovkasm
vovkasm / README.md
Created June 24, 2019 20:34
Sample minimal readme for RN project.

MyProject

Prereqs

  • java, ant
  • Xcode
  • ruby

Install deps

@vovkasm
vovkasm / app-build.gradle
Created June 18, 2019 21:04
Some gradle deps for RN 0.59.9
// android/app/build.gradle
// ... some RN stuff
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.supportLibVersion}"
implementation "com.android.support:cardview-v7:${rootProject.supportLibVersion}"
implementation "com.android.support:customtabs:${rootProject.supportLibVersion}"
@vovkasm
vovkasm / Chat.spec.tsx
Created June 18, 2019 07:35
Sample test (not full, only to show code)
mport 'jest'
import { clock } from 'testing/setupFakeTimers'
import { TestController as Ctrl } from 'testing/testController'
import React from 'react'
import Renderer, { act } from 'react-test-renderer'
beforeEach(() => {
// simplifyed code
@vovkasm
vovkasm / RNFirebase.podspec
Created May 16, 2019 08:40
patched podspec for RNFirebase
# ios/podspecs/RNFirebase.podspec
require 'json'
package = JSON.parse(File.read(File.join(__dir__, '../../node_modules/react-native-firebase/package.json')))
Pod::Spec.new do |s|
s.name = "RNFirebase"
s.version = package["version"]
s.summary = package["description"]
s.description = <<-DESC
A well tested feature rich Firebase implementation for React Native, supporting iOS & Android.
@vovkasm
vovkasm / globals.d.ts
Created April 30, 2019 20:28
Typescript globals for react-native
declare module '*.png' {
import { ImageRequireSource } from 'react-native'
const content: ImageRequireSource
export default content
}
declare module 'react-native/Libraries/Components/TextInput/TextInputState' {
export function blurTextInput(textFieldID?: number): void
export function currentlyFocusedField(): number | null
export function focusTextInput(textFieldID?: number): void
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Sample' do
project 'Sample', {
'Debug' => :debug,
'Staging' => :release,
'Production' => :release,
}