Skip to content

Instantly share code, notes, and snippets.

View misterfourtytwo's full-sized avatar
🍌

Aliaksei Tratseuski misterfourtytwo

🍌
View GitHub Profile
@PlugFox
PlugFox / bad_blocs.md
Last active February 13, 2024 12:26
БИНГО ошибок при создании BLoC'а

БИНГО ошибок при создании BLoC'а

❗❗❗ОБНОВЛЕННАЯ ВЕРСИЯ СТАТЬИ НАХОДИТСЯ ТУТ ❗❗❗

ОШИБКИ:

  1. Начать писать логику непосредственно в mapEventToState,
    он у вас быстренько превратится в нечитаемую портянку и придете жаловаться на бойлерплейт.
    Если правильно готовить блок, то бойлерплейтом там и не пахнет,
    эвенты + стейты + блок умещаются все вместе на 1-2 экранах.
@loic-hamdi
loic-hamdi / interactive_viewer_overlay.dart
Last active January 30, 2022 19:03
InteractiveViewerOverlay
import 'package:flutter/material.dart';
class InteractiveViewerOverlay extends StatefulWidget {
final Widget child;
final double maxScale;
const InteractiveViewerOverlay({
Key key,
@required this.child,
this.maxScale,
import 'package:flutter/material.dart';
class OverlayContainer extends StatefulWidget {
/// The child to render in the regular document flow (defaults to Container())
final Widget child;
/// The widget to render inside the [OverlayEntry].
final Widget overlay;
/// Offset to apply to the [CompositedTransformFollower]
@pstehlik
pstehlik / ipfs_install.sh
Created February 4, 2018 22:36
Install IPFS on Ubuntu 16.04 64bit and set up as systemd service
#!/bin/bash
#pick your IPFS version
VERS=0.4.13
DIST="go-ipfs_v${VERS}_linux-amd64.tar.gz"
sudo apt-get update
sudo apt-get install golang-go -y
wget https://dist.ipfs.io/go-ipfs/v0.4.13/$DIST
tar xvfz $DIST
@guysoft
guysoft / timezone_bot.y
Created August 10, 2017 14:51
A telegram bot that lets you pick a timezone
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A telegram bot that lets you pick and a timezone
@author Guy Sheffer (GuySoft) <guysoft at gmail dot com>
"""
from telegram.ext import Updater
from telegram.ext import CommandHandler
from telegram.ext import ConversationHandler, RegexHandler
@chantellosejo
chantellosejo / build.gradle
Last active June 28, 2022 20:44
Gradle Build file that creates different "apps" based on the build type, letting you load apps side-by-side (beta vs. production)
apply plugin: 'com.android.application'
def final yourApplicationId = 'com.yourId.android'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
sourceSets {
androidTest {
java.srcDirs = ['test/java']
}
}
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"