Skip to content

Instantly share code, notes, and snippets.

Working from home

Dmitry Dimon70007

Working from home
View GitHub Profile
Dimon70007 / Makefile Tricks
Created Aug 18, 2021 — forked from pushandplay/Makefile Tricks
Makefile Tricks: Arithmetic – Addition, Subtraction, Multiplication, Division, Modulo, Comparison
View Makefile Tricks
NUMBER1 := 10
NUMBER2 := 5
ADD := $(shell echo ${NUMBER1}+${NUMBER2} | bc)
SUBTRACT := $(shell echo ${NUMBER1}-${NUMBER2} | bc)
Dimon70007 / Podfile
Created Dec 6, 2019
cocoapods Debug hook for project with many schemes and configurations
View Podfile
# targets with dependencies
# This is an alternative for manually specifying every configuration as :debug [link](
# 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 / Podfile
Last active Nov 18, 2019
resolving static and dynamic frameworks or libraries with cocoapods
View Podfile
# Add this code at the top of Podfile
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?(
puts "Overriding the static_framework? method for #{}"
Dimon70007 / gist:238a7a0371183c6ed4bea8a97bef6437
Created Jul 2, 2019
sample build.gradle for library. that uses buildGradle version from root project
View gist:238a7a0371183c6ed4bea8a97bef6437
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
buildscript {
repositories {
maven {
url ''
name 'Google'
Dimon70007 / Adapter for Drawer
Created May 15, 2019
Adapter for Drawer (native-base uses react-native-drawer under the hood)
View Adapter for Drawer
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 },
View gist:e91ad3006930e84936fe2605320e2b9a
cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/ ~/.ssh/
# change permissions on file
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/
# start the ssh-agent in the background
eval $(ssh-agent -s)
# make ssh agent to actually use copied key
ssh-add ~/.ssh/id_rsa
View crash on tryCollapseTimeline
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(
at flussonic.watcher.sdk.presentation.watcher.-$$Lambda$FlussonicWatcherView$kfbfhYsS9XvYSUCapHnxGSyedeU.onAnimationEnd(lambda)
at flussonic.watcher.sdk.presentation.timeline.animation.AnimationListener.onAnimationEnd(
at android.animation.ValueAnimator.endAnimation(
at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(
at android.animation.ValueAnimator$AnimationHandler$
at android.view.Choreographer$
at android.view.Choreographer.doCallbacks(
at androi
View crash with http protocol
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$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: Hostname 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:
2018-12-18 12:27:15.095 4835-4835/com.flussonic.watcher W/System.err: subjectAltNames: []
2018-12-18 12:27:15.096 4835-4835/com.flussonic.watcher W/System.err: at io.reactivex.plugins.RxJavaPlugins.onErr
Dimon70007 / plan of building app.txt
Last active Jul 24, 2017
components of schedule of airplains
View plan of building app.txt
- 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
# 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 ->