Skip to content

Instantly share code, notes, and snippets.

View marceloneppel's full-sized avatar

Marcelo Henrique Neppel marceloneppel

View GitHub Profile
@ukos-git
ukos-git / patch-vmware12.sh
Last active September 8, 2018 08:48
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"
@caioaao
caioaao / collisions.clj
Last active April 24, 2025 00:54
Solution to Nubank's collision exercise, in Clojure
(ns collisions.core
(:require [clojure.string :as str])
(:gen-class))
(defn str->edge [s]
(->> (str/split s #" ")
(map #(Integer/parseInt %))))
(defn file-contents->edges [s]
(->> (str/split s #"\n")
@eduardocp
eduardocp / async_helper.dart
Last active October 15, 2018 23:21
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;
@bmaupin
bmaupin / free-database-hosting.md
Last active July 15, 2025 13:27
Free database hosting
@mjohnsullivan
mjohnsullivan / draggable_custom_painter.dart
Created November 26, 2019 21:32
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(
@kadereub
kadereub / numba_polyfit.py
Last active October 5, 2024 20:33
A numba implementation of numpy polfit
# Load relevant libraries
import numpy as np
import numba as nb
import matplotlib.pyplot as plt
# Goal is to implement a numba compatible polyfit (note does not include error handling)
# Define Functions Using Numba
# Idea here is to solve ax = b, using least squares, where a represents our coefficients e.g. x**2, x, constants
@nb.njit
@suapapa
suapapa / record.go
Created April 19, 2020 08:20
raw audio recording with portaudio and golang
package main
import (
"encoding/binary"
"fmt"
"os"
"os/signal"
"time"
"github.com/gordonklaus/portaudio"
@michielmulders
michielmulders / curl-rust.rs
Created September 11, 2020 09:54
Curl-rust POST request example
use std::io::Read;
use curl::easy::Easy;
fn main() {
let mut data = "this is the body".as_bytes();
let mut easy = Easy::new();
easy.url("http://www.example.com/upload").unwrap();
easy.post(true).unwrap();
easy.post_field_size(data.len() as u64).unwrap();
@developer-guy
developer-guy / KIND_Networking.md
Created October 21, 2020 10:00 — forked from aojea/KIND_Networking.md
Use KIND to emulate complex network scenarios

Networking scenarios [Linux Only]

KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.

Docker Networking

KIND uses a docker user defined network.

It creates a bridge named kind