Skip to content

Instantly share code, notes, and snippets.

View ljmf00's full-sized avatar
🐟
Tuned pro gramming

Luís Ferreira ljmf00

🐟
Tuned pro gramming
View GitHub Profile
@ljmf00
ljmf00 / fancy_yaml.sh
Created September 10, 2019 15:33
Fancy YAML parser
# YAML Parser
# This function parse a simple YAML file and pass it to individual variables
# Usage: parse_yaml <FILE> [PREFIX]
# Thanks to: https://stackoverflow.com/questions/5014632/how-can-i-parse-a-yaml-file-from-a-linux-shell-script
parse_yaml() {
local prefix=$2
local ys='[[:space:]]*' yw='[a-zA-Z0-9_]*'
local fs
fs=$(echo @|tr @ '\034')
//ex1
//a
B=-4:9
C=[]
for i=B
C(1,$+1)=ceil(%e^i)
end
C=unique(C)
// |>().
//ex1
//a
A=-19:34
B=[]
for p=-40:70
for q=1:3
B(1,$+1)=p/q
@ljmf00
ljmf00 / app.d
Last active April 20, 2019 19:05
Google Kickstart Round A - 1st Exercise
module app;
import std.stdio : writeln;
import std.array : split;
/// Structure that represents a case
struct Case {
// TODO: For better memory management, some variables could be omitted
size_t[] playerSkills;
size_t[] skillCompare;
# Maintainer: schuay <jakob.gruber@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: danst0 <danst0@west.de>
# Build order: avr-binutils -> avr-gcc -> avr-libc
pkgname=avr-gdc
_gitname=gcc
pkgver=167281.9724de38f8f
@ljmf00
ljmf00 / tuna.c
Created December 11, 2018 13:27
tuna
#include <stdio.h>
#define t int
#define tu main
#define tun (
#define tuna void
#define tunat )
#define tunatu while
#define tunatun 1
#define tunatuna {
#define tunatunat }
export LC_ALL=C
setopt shwordsplit >> ~/.zshrc
source ~/.zshrc
virtualenv2 venv
source venv/bin/activate
@ljmf00
ljmf00 / gist:6035e02073e0ce9250fe2be1cbff40d9
Last active August 24, 2023 06:55
Public Trackers for Torrent
udp://tracker.leechers-paradise.org:6969/announce
udp://tracker.torrent.eu.org:451/announce
udp://public.popcorn-tracker.org:6969/announce
udp://tracker.open-internet.nl:6969/announce
udp://ipv6.open-internet.nl:6969/announce
// ____ ____ __ ___ _ _ __ __ _
// ( _ \( _ \ / \ / __)( \/ )/ \ ( ( \
// ) __/ ) /( O )( (__ ) /( O )/ /
// (__) (__\_) \__/ \___)(__/ \__/ \_)__)
//
// Copyright (c) 2018 Luís Ferreira
//
// MIT License
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@ljmf00
ljmf00 / exprtk.hpp
Created October 27, 2017 19:48
C++ Mathematical Expression Library
This file has been truncated, but you can view the full file.
/*
******************************************************************
* C++ Mathematical Expression Toolkit Library *
* *
* Author: Arash Partow (1999-2017) *
* URL: http://www.partow.net/programming/exprtk/index.html *
* *
* Copyright notice: *
* Free use of the C++ Mathematical Expression Toolkit Library is *
* permitted under the guidelines and in accordance with the most *