Skip to content

Instantly share code, notes, and snippets.

View adrianolsk's full-sized avatar

Adriano Skroch adrianolsk

  • Wealthsimple
  • Calgary, Canada
View GitHub Profile
@adrianolsk
adrianolsk / remove_docker_images.sh
Created August 19, 2019 01:09
remove none docker images
# to remove
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
# build images using
docker build --rm
// 1
import { peopleReducer as peopleState } from './reducers/peopleReducer.ts';
import { combineReducers } from 'redux';
export const rootReducer = combineReducers({
peopleState,
});
export type AppState = ReturnType<typeof rootReducer>;
@adrianolsk
adrianolsk / my-connected-component.tsx
Created July 22, 2019 17:56 — forked from aheitzmann/my-connected-component.tsx
A best practice pattern for defining and using typescript types for a redux-react connected component
import * as React from 'react'
import * as Redux from 'redux'
import { MyReduxState } from './my-root-reducer.ts'
export interface OwnProps {
propFromParent: number
}
interface StateProps {
import React from 'react';
import {
DialogActionsDefault,
DialogContent,
DialogTitle,
} from '../../components/ModalDialog';
import { Formik, Form } from 'formik';
import { Grid } from '@material-ui/core';
import Dialog from '@material-ui/core/Dialog';
import * as Yup from 'yup';
@adrianolsk
adrianolsk / fix-microphone-background-noise.sh
Last active September 29, 2022 06:42
FIx linux microfone background noise
# Microphone Realtime background noise reduction script
# author Luigi Maselli - https://grigio.org licence: AS-IS
# credits: http://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio
# run as: sudo && pulseaudio -k
# wget -qO - https://gist.github.com/adrianolsk/bfa32f3227dc674eff72a2008f6c0316 | sudo bash && pulseaudio -k
sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak
sudo cat <<EOT >> /etc/pulse/default.pa
load-module module-echo-cancel source_name=noechosource sink_name=noechosink
@adrianolsk
adrianolsk / bash_interactive.sh
Created January 11, 2019 19:46
Get input options in a bash script
NORMAL="\\033[0;39m"
RED="\\033[1;31m"
BLUE="\\033[1;34m"
GREEN="\\033[1;32m"
while true; do
echo -e "$BLUE------------------------------------------"
echo -e "$BLUE Escolha uma opção: $NORMAL"
echo ""
@adrianolsk
adrianolsk / flutter_cheatsheet.md
Created December 28, 2018 12:55 — forked from vmwsree/flutter_cheatsheet.md
Cheat Sheet For Flutter

Container to be full width

constraints: BoxConstraints.expand() so the child a column can have expanded

Outlined Text Box

TextField(
  controller: _usernameController,
  decoration: InputDecoration(
@adrianolsk
adrianolsk / Android Privacy Policy Template
Created December 12, 2018 13:41 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@adrianolsk
adrianolsk / docker.md
Last active August 28, 2018 22:35
Today I learned

error

Error saving credentials: error storing credentials in Ubuntu 18.04 LTS

solution:

mv /usr/bin/docker-credential-secretservice /usr/bin/docker-credential-secretservice_x

@adrianolsk
adrianolsk / install-docker.sh
Created August 6, 2018 00:28 — forked from dweldon/install-docker.sh
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/