Skip to content

Instantly share code, notes, and snippets.

View Dimon70007's full-sized avatar
🏠
Working from home

Dmitry Dimon70007

🏠
Working from home
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@Dimon70007
Dimon70007 / plan of building app.txt
Last active July 24, 2017 19:15
components of schedule of airplains
- discussing details of app's interface with consumer - 4 hours
- building an app and connecting of all dependencies - 8 hours
- creating header element - 1 hour
- connecting and configuring infiniteScroll lib - 8 hours or more
- creating calendar element - 1 hour
- creating explore element - 1 hour
- creating explore list - 1 hour
- creating requests api or connecting and configuring existed lib - 2 hours
- creating stub component for empty data - 1 hour
- testing and refactoring all components - 8 hours
2018-12-18 12:27:00.058 4835-4835/com.flussonic.watcher W/PropertyValuesHolder: Method set() with type float not found on target class class me.zhanghai.android.materialprogressbar.IndeterminateHorizontalProgressDrawable$RectTransformX
2018-12-18 12:27:15.095 4835-4835/com.flussonic.watcher W/System.err: io.reactivex.exceptions.UndeliverableException: flussonic.watcher.sdk.domain.exceptions.UnexpectedException: flussonic.watcher.sdk.domain.exceptions.TryCountExceeded: javax.net.ssl.SSLPeerUnverifiedException: Hostname 212.158.173.222 not verified:
2018-12-18 12:27:15.095 4835-4835/com.flussonic.watcher W/System.err: certificate: sha256/IfeXcE4eMXlY4Lk0NlilrEtAwL8BjJ40R7WIvm6jvTQ=
2018-12-18 12:27:15.095 4835-4835/com.flussonic.watcher W/System.err: DN: CN=bc71.s.erlyvideo.ru
2018-12-18 12:27:15.095 4835-4835/com.flussonic.watcher W/System.err: subjectAltNames: [bc71.s.erlyvideo.ru]
2018-12-18 12:27:15.096 4835-4835/com.flussonic.watcher W/System.err: at io.reactivex.plugins.RxJavaPlugins.onErr
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void flussonic.watcher.sdk.presentation.timeline.FlussonicTimelineView.collapse()' on a null object reference
at flussonic.watcher.sdk.presentation.watcher.FlussonicWatcherView.lambda$tryCollapseTimeline$2(FlussonicWatcherView.java:582)
at flussonic.watcher.sdk.presentation.watcher.-$$Lambda$FlussonicWatcherView$kfbfhYsS9XvYSUCapHnxGSyedeU.onAnimationEnd(lambda)
at flussonic.watcher.sdk.presentation.timeline.animation.AnimationListener.onAnimationEnd(AnimationListener.java:27)
at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239)
at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766)
at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at androi
@Dimon70007
Dimon70007 / gist:e91ad3006930e84936fe2605320e2b9a
Created April 23, 2019 09:24
copy ssh key to new system
cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub
# change permissions on file
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
# start the ssh-agent in the background
eval $(ssh-agent -s)
# make ssh agent to actually use copied key
ssh-add ~/.ssh/id_rsa
@Dimon70007
Dimon70007 / Adapter for Drawer
Created May 15, 2019 23:20
Adapter for Drawer (native-base uses react-native-drawer under the hood)
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Drawer } from 'native-base';
import { noop } from '../utils';
const drawerStyles = {
drawer: {
shadowColor: '#000000', shadowOpacity: 0.5, shadowRadius: 3, shadowOffset: { width: 1, height: 5 },
},
main: { paddingLeft: 3 },
@Dimon70007
Dimon70007 / gist:238a7a0371183c6ed4bea8a97bef6437
Created July 2, 2019 20:02
sample build.gradle for library. that uses buildGradle version from root project
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
buildscript {
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
@Dimon70007
Dimon70007 / Podfile
Last active November 18, 2019 23:15
resolving static and dynamic frameworks or libraries with cocoapods
# Add this code at the top of Podfile
use_frameworks!
dynamic_frameworks = ['Alamofire', 'Async', 'Moya', 'Result', 'RxCocoa', 'RxSwift', 'SwiftyXMLParser', 'TrueTime']
# make all the other frameworks into static frameworks by overriding the static_framework? function to return true
pre_install do |installer|
installer.pod_targets.each do |pod|
if !dynamic_frameworks.include?(pod.name)
puts "Overriding the static_framework? method for #{pod.name}"
@Dimon70007
Dimon70007 / Podfile
Created December 6, 2019 16:39
cocoapods Debug hook for project with many schemes and configurations
# targets with dependencies
# This is an alternative for manually specifying every configuration as :debug [link](http://guides.cocoapods.org/syntax/podfile.html#project).
# Because of cocoapods by default uses :release type for all configurations but Debug
# we need to change every configuration, named <configuration_name>.Debug
# at the bottom of file
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
@Dimon70007
Dimon70007 / Makefile Tricks
Created August 18, 2021 10:40 — forked from pushandplay/Makefile Tricks
Makefile Tricks: Arithmetic – Addition, Subtraction, Multiplication, Division, Modulo, Comparison
NUMBER1 := 10
NUMBER2 := 5
#Addition
ADD := $(shell echo ${NUMBER1}+${NUMBER2} | bc)
#Subtraction
SUBTRACT := $(shell echo ${NUMBER1}-${NUMBER2} | bc)
#Multiplication