Skip to content

Instantly share code, notes, and snippets.

@PedroHLC
PedroHLC / example.uni
Last active October 10, 2017 01:14
A never finished ugly & useless programming language
global var int test
module Exemplo {
module SubModulo {
class OlhaUmaClasse {
const var<public> string test = "woohoo"
const var<public> vector<vector<int>> test2 = [[5, 6, 7, 8]]
const var<protected> double other_test = 80 + 50.5 + (60 * 8 + 7)
const var string more_test = "blabla bla ${other_test}" + ", woohoo\n"
const var<private> byte example = 0xA3
@PedroHLC
PedroHLC / photoshop.pol.sh
Last active January 9, 2023 21:37
PlayOnLinux script for installing any photoshop version (x86) using winetricks
#!/bin/bash
# Create wineprefix using this script, install Photoshop, do not run it, then change wine version to '1.7.41-PhotoshopBrushes' emulating 'win7'
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX='Photoshop'
WINEVERSION='1.9.3-staging'
TITLE='Adobe Photoshop'
EDITOR='Adobe Systems Inc.'
pkgname=shashlik-bin
pkgver=0.9.1
pkgrel=1
pkgdesc="Android Apps on Real Linux - Precompiled binary from official repository"
arch=('x86_64')
url="http://www.shashlik.io"
license=('')
options=(!strip)
depends=('lib32-gcc-libs' 'lib32-zlib' 'python-xdg' 'kdebase-kdialog')
conflicts=('shashlik' 'shashlik-git')
@PedroHLC
PedroHLC / tictactoe.alg
Created April 5, 2016 17:06
Visualg TicTacToe
Algoritmo "tictactoe"
// Disciplina : CAP
// Professor : Vânia
// Descrição : jogo da velha
// Autor(a) : Pedro Henrique Lara Campos
// Data atual : 05/04/2016
Var
// Seção de Declarações das variáveis
mesa: vetor [0..2,0..2] de caracter
turno: logico
#include <stdio.h>
int main() {
int exemplo[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, x, y, aux;
for(y=0; y < 9; y++) {
for(x = 0; x < 9; x++)
if(exemplo[x] > exemplo[x+1]) {
aux = exemplo[x];
exemplo[x] = exemplo[x+1];
exemplo[x+1] = aux;
}
#include <stdio.h>
#include <stdlib.h>
#define n 10
#include <time.h>
int main()
{
int vet1[n],vet2[n],uniao[n*2];
int i,j,vdd=0,max,cont=0;;
srand(time(NULL));
printf("Primeiro vetor:\n");
@PedroHLC
PedroHLC / natasha_minmax.c
Created June 29, 2016 00:13
Min Max ala CAP style
#include <stdio.h>
struct POSICAO {
double x;
double y;
};
struct POSICAO achar_min_max(int qtd_pontos, struct POSICAO *pontos) {
if(qtd_pontos == 1) {
return pontos[0];
//ex1
import Foundation
func fibbo(alvo: UIntMax) -> IntMax? {
switch alvo {
case 0:
return nil
case 1...2:
return 1
default:
@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
@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