Skip to content

Instantly share code, notes, and snippets.

Christian Passold Chrispassold

Block or report user

Report or block Chrispassold

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Helpful links
View PermissionHelper.kt
import android.content.Context
import android.content.Intent
import android.provider.Settings
import androidx.core.content.ContextCompat
Chrispassold / TimeInput.js
Created Oct 18, 2019
Time input with validation and simple mask
View TimeInput.js
import React from 'react';
import { Input } from 'semantic-ui-react';
class TimeInput extends React.Component {
state = {
time: '',
handleChange = (event, { name, value }) => {
value = value.replace(":", "")
Chrispassold / build.gradle
Created Sep 9, 2019
Helpers for build gradle
View build.gradle
buildscript {
ext.versionMajor = 1
ext.versionMinor = 0
ext.versionPatch = 0
ext.generateVersionCode = {
return ext.minSdkVersion * 10000000 + ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
ext.generateVersionName = {
Chrispassold / NetworkOnlyBoundResource.kt
Created Jul 3, 2019
Same logic of NetworkBoundResource but only with network data
View NetworkOnlyBoundResource.kt
import android.content.Context
import io.reactivex.Flowable
import io.reactivex.exceptions.Exceptions
import io.reactivex.schedulers.Schedulers
import retrofit2.HttpException
import retrofit2.Response
import timber.log.Timber
Chrispassold / 07032019
Last active Mar 16, 2019
Computação gráfica
View 07032019
- Dados
- Tipos de Informação
- Raster
- Resolução
- Profundidade de cor
- Vetorial
- Dimensão da informação
- 1D, 2D, 3D, 4D, 5D
- Sistema referência
Chrispassold / Creating docker machine
Last active Mar 14, 2019
Docker Desktop Hyperv (Windows)
View Creating docker machine
#Powershell with admin mode
To create a new docker machine you should have a virtual switch on Hyperv Manager
This post helps me:
Then you can create
docker-machine create -d hyperv --hyperv-virtual-switch <NAME VIRTUAL SWICHT> <NEW MACHINE NAME>
& "C:\Program Files\Docker\Docker\Resources\bin\docker-machine.exe" env default | Invoke-Expression
[{"id":"fbb47df.cfdae8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"921e4718.36eaa8","type":"rpi-dht22","z":"fbb47df.cfdae8","name":"","topic":"rpi-dht22","dht":22,"pintype":"0","pin":"18","x":564.5,"y":80,"wires":[["612eb64e.ca2458"]]},{"id":"8a63b616.e6a7e8","type":"twitter out","z":"fbb47df.cfdae8","twitter":"","name":"Twitter sender","x":1099,"y":113,"wires":[]},{"id":"612eb64e.ca2458","type":"function","z":"fbb47df.cfdae8","name":"Build message","func":"\nvar date = new Date();\n\nmsg.payload = 'hora: ' + date.getTime() + ', temperatura: ' + msg.payload + ', umidade: ' + msg.humidity ;\n\nreturn msg;","outputs":1,"noerr":0,"x":876,"y":90,"wires":[["8a63b616.e6a7e8"]]},{"id":"c9fb2e28.900e2","type":"AWS Rekognition","z":"fbb47df.cfdae8","aws":"cf9a3ab5.55fd28","operation":"DetectText","SourceImage":"","TargetImage":"","CollectionId":"","Input":"","Output":"","Name":"","Settings":"","RoleArn":"","FaceIds":"","Image":"{ \"S3Object\": { \"Bucket\": \"concentrado-raspb
Chrispassold / netbeans.conf
Last active Nov 9, 2018
Netbeans great config
View netbeans.conf
netbeans_default_options="-J-client -J-Xverify:none -J-Xss2m -J-Xms256m -J-Xmx1024m -J-XX:PermSize=128m -J-XX:MaxPermSize=1000m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dnetbeans.logger.console=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:CompileThreshold=100 -J-DsvnClientAdapterFactory=commandline -J-Duser.language=en -J-Duser.region=US -J-DpreferGradle=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"
View git commands
Delete the most recent commit, keeping the work you've done:
git reset --soft HEAD~1
Delete the most recent commit, destroying the work you've done:
git reset --hard HEAD~1
You can’t perform that action at this time.