Skip to content

Instantly share code, notes, and snippets.

View marceloneppel's full-sized avatar

Marcelo Henrique Neppel marceloneppel

View GitHub Profile
@marceloneppel
marceloneppel / patch-vmware12.sh
Created May 24, 2018 19:42 — forked from ukos-git/patch-vmware12.sh
download and patch vmware 12.5.9 from mkubecek's repo
#!/bin/bash
#
# script for downloading and installing
# https://github.com/mkubecek/vmware-host-modules
#
# License GPL
#
CWD=$(pwd)
VMWARE_VERSION="workstation-12.5.9"
@marceloneppel
marceloneppel / accessing-virtualbox.md
Created May 25, 2018 17:38
Accessing your Virtualbox Guest from your Host OS

Accessing your Virtualbox Guest from your Host OS

As a developer you want to ping and access the webserver on your virtual machine. This is a very simple solution to enable the bridge to the guest VM.

Requirements

  • VirtualBox (latest version)
  • A guest operation system (e.g. Ubuntu)
@marceloneppel
marceloneppel / async_helper.dart
Created October 15, 2018 23:21 — forked from eduardocp/async_helper.dart
Helper to do async methods in other thread in flutter
import 'dart:isolate';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
enum AsyncState { idle, loading, running }
class AsyncMessage {
final Function asyncMethod;
List data;
SendPort sendPort;
@marceloneppel
marceloneppel / draggable_custom_painter.dart
Created November 27, 2019 12:54 — forked from mjohnsullivan/draggable_custom_painter.dart
Handling draggable areas or elements drawn on a Flutter CustomPainter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Draggable Custom Painter',
home: Scaffold(
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Draggable Custom Painter',
home: Scaffold(
@marceloneppel
marceloneppel / main.dart
Created December 31, 2019 22:47 — forked from slightfoot/main.dart
Firebase Login/Logout Example - by Simon Lightfoot
/*
This example uses the following packages:
firebase_auth: 0.14.0+5
google_sign_in: 4.0.7
provider: 3.1.0+1
Make sure you have setup your project with Firebase by following these instructions:
1. Follow Option 1 instructions here up to Step 3
@marceloneppel
marceloneppel / multi_select.dart
Created December 31, 2019 23:55 — forked from slightfoot/multi_select.dart
Multi Select GridView in Flutter - by Simon Lightfoot (Drag to select multiple items) Try now here: https://dartpad.dev/experimental/embed-new-flutter.html?id=fbd01e9700bd19af3c71dafa0fbb454b&split=50
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@marceloneppel
marceloneppel / formatar_cnpj_cpf.md
Created January 6, 2020 12:17 — forked from davidalves1/formatar_cnpj_cpf.md
Função para formatar CNPJ e CPF, disponível em PHP e JS

PHP

function formatCnpjCpf($value)
{
  $cnpj_cpf = preg_replace("/\D/", '', $value);
  
  if (strlen($cnpj_cpf) === 11) {
    return preg_replace("/(\d{3})(\d{3})(\d{3})(\d{2})/", "\$1.\$2.\$3-\$4", $cnpj_cpf);
  } 
 
@marceloneppel
marceloneppel / dummy-web-server.py
Created March 23, 2020 14:28 — forked from bmcculley/dummy-web-server.py
a minimal http server in python (2/3). Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@marceloneppel
marceloneppel / windows10activation
Created April 15, 2020 22:23
Activate Windows 10 without Any Activator
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH