Skip to content

Instantly share code, notes, and snippets.

@PedroHLC
PedroHLC / Helper.elm
Created July 7, 2017 17:24
FontAwesome on Elm using unicode tags
module FontAwesome.Helper exposing (..)
import Css exposing (Style, Snippet, fontFamilies, before)
type alias UnicodeTag =
String
fontAwesome : Style
@PedroHLC
PedroHLC / binary_tree.rs
Created July 1, 2017 20:34
incomplete data structures implemented in Rust for academy purposes
use std::fmt;
use std::any::Any;
// Implements Binary Trees
#[derive(Clone)]
struct BruteBinaryTree<T> {
info: T,
left: BinaryTree<T>,
right: BinaryTree<T>,
}
@PedroHLC
PedroHLC / main.rb
Created June 26, 2017 18:57
PixelCanvas.io Multi-threaded BOT
#!/usr/bin/ruby
# [INCOMPLETE]
# PixelCanvas.io Multi-threaded BOT
require 'free-image'
require 'socket'
require 'net/http'
require 'json'
@PedroHLC
PedroHLC / mingw-w64-gc.PKGBUILD
Last active May 18, 2017 16:37
mingw-w64-gc for ArchLinux
# Original author: Alexey Pavlov <[email protected]>
MINGW_PACKAGE_PREFIX="mingw-w64"
_realname=gc
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=7.4.2
pkgrel=1
pkgdesc="A garbage collector for C and C++ (mingw-w64)"
arch=('any')
url="http://www.hboehm.info/gc"
@PedroHLC
PedroHLC / hostapd-wpe.PKGBUILD
Last active October 30, 2019 16:18
hostapd-wpe 2.8
_pkgname=hostapd
pkgname="${_pkgname}-wpe"
pkgver=2.8
pkgrel=0
pkgdesc="IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator (with hostapd-wpe patch)"
arch=('x86_64' 'aarch64')
url="https://w1.fi/hostapd/"
license=(GPL)
depends=('openssl' 'libnl')
options=(emptydirs)
#include <iostream>
using namespace::std;
class Ponto{
public:
Ponto(int _x=1, int _y=1);
void setX(int _x);
int getX() const;
#include <iostream>
#include <math.h>
#include "circulo.h"
using namespace::std;
ostream& operator<<(ostream &saida, const Cilindro& cl) {
saida << "Cilindro:" << endl << "\t(" << cl.getX() << ", " << cl.getY() << ")" << endl << "\tAltura: " << cl.getAltura()
<< endl << "\tVolume: " << cl.getVolume() << endl;
return saida;
}
@PedroHLC
PedroHLC / experimento_matrizes.cpp
Created December 13, 2016 19:26
Experimento somando matrizes
#include <stdlib.h>
#include <iostream>
using namespace std;
class Matriz {
private:
double *data;
size_t cols;
size_t lins;
@PedroHLC
PedroHLC / ideia.txt
Created September 13, 2016 18:46
PlugInAnyOS
[THIS IS JUST THE HELL OF AN IDEIA I GOT, BUT PROBABLY WILL NEVER IMPLEMENT]
What is PlugInAnyOS?
+ First of all, it isn't an OS.
+ It's actual job is to create, manage and run multiple SOs.
What it can do?
+ Create and manage any OS rootfs using what it calls layers and enviroments.
+ Create and manage pseudo enviroments (in case you want to chroot in a different env, or sandbox some app).
+ Capable of running multiple OSs simulteneously using HVM
@PedroHLC
PedroHLC / keenow-dnsmasq.conf
Last active August 29, 2023 14:47
dnsmasq.conf for using keenow smart dns
domain-needed
all-servers
cache-size=5000
strict-order
# you might want to remove netflix, crackle, crunchyroll, spotify, steam, origin, daisuki and hbogo if those are available and works well for you
server=/keenow.com/keen.tv/history.com/8tracks.com/abc.go.com/adultswim.com/aetv.com/ahctv.com/amazon.com/amc.com/animalplanet.com/bloomberg.com/cartoonnetwork.com/cbs.com/cbsstatic.com/cbsi.com/netflix.com/cc.com/channel.nationalgeographic.com/crackle.com/crunchyroll.com/cwseed.com/cwtv.com/daisuki.net/discovery.com/disneymoviesanywhere.com/dramafever.com/eonline.com/fox.com/funimation.com/fxnetworks.com/go.cnn.com/hbogo.com/hgtn.com/hot97.com/huffingtonpost.com/hulu.com/iheart.com/indieflix.com/marvel.com/mlb.com/mlssoccer.com/mtv.com/mylifetime.com/nba.com/nbc.com/nhl.com/nick.com/now.telemundo.com/on.aol.com/ondemandkorea.com/origin.com/oscar.go.com/oxygen.com/pandora.com/pivot.tv/watchable.com/rdio.com/rhapsody.com/seeso.com/sho.com/shonenjump.viz.com/showtime.com/simpsonsworld.com/smithsonianchannel.com/s