Skip to content

Instantly share code, notes, and snippets.

View Luiz-Monad's full-sized avatar
💭
computing

Luiz Luiz-Monad

💭
computing
View GitHub Profile
/*
[DESAFIO / LANGUAGE WAR] Implemente um programa na sua linguagem favorita onde o usuário digita um número x, e o programa calcula o somatório dos x primeiros números pares da sequência fibonacci, e imprime a soma dos algarismos desse número.
Por exemplo, quando x = 5, a resposta é 17, pois:
1. A sequência fibonacci é 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,...
2. Os 5 primeiros números pares são 0, 2, 8 e 34, 144.
3. O somatório disso é 188.
4. Somando os algarismos, 1+8+8 = 17
-- Function: clone_schema(text, text, text)
-- DROP FUNCTION clone_schema(text, text, text);
CREATE OR REPLACE FUNCTION clone_schema(source_schema text, dest_schema text, dest_owner text)
RETURNS void AS
$BODY$
DECLARE
seq RECORD;
#Creates a named function using the script block.
function Add-Function(
[string]$name,
[Parameter(ValueFromPipeline=$true)]
[ScriptBlock]$block)
{
New-Item -Path "Function:" -Name "global:$name" -Value $block
}
Penetration Testing Execution Standard
http://www.pentest-standard.org/index.php
ISIS Lab's Hack Night - An Intense Introduction to Offensive Security
https://github.com/isislab/Hack-Night/
FSU Offensive Computer Security
http://www.cs.fsu.edu/~redwood/OffensiveComputerSecurity ( 2014 )
http://www.cs.fsu.edu/~redwood/OffensiveSecurity ( 2013 )
@Luiz-Monad
Luiz-Monad / gist:2466dc1aca84a3a02357
Created October 14, 2015 19:17
powershell build
$packages = (git diff --name-only $env:TRAVIS_COMMIT_RANGE) |
? { $_ -like "conda/*" } |
% { $_ | split-path -leaf } |
group | % { $_.name }
write-host "Packages to be built: $packages"
foreach ( $pkg in $packages )
{
foreach ( $python in $env:PYTHON )
{
conda build "conda/$pkg" --python $python
@Luiz-Monad
Luiz-Monad / Programming the GameboyAdvanced
Last active June 7, 2017 20:22
Programming the GameboyAdvanced
[Reading]
Programming The Nintendo GameBoyAdvance : The Unofficial Guide
Department of Sensor Systems Technology 'The Game BoyTM Project'
Everything You Always Wanted To Know About GAMEBOY
[info about the Serial Link]
http://www.darkfader.net/gba/
[Search Gameboy multiboot]
http://www.kernelthread.com/publications/gbaunix/
https://developer.mbed.org/users/kek/notebook/gameboy-advance-multiboot/
http://reinerziegler.de/GBA/gba.htm
@Luiz-Monad
Luiz-Monad / peano.cpp
Created January 8, 2016 21:58
Peano numbers with constexpr metaprogramming (yet another implementation)
template<typename T>
struct S {
typedef T Previous;
enum { ToInt = T::ToInt + 1 };
};
struct Z { enum { ToInt = 0 }; };
template<typename T>
@Luiz-Monad
Luiz-Monad / peano_complex.cpp
Last active October 22, 2016 20:25
peano_complex.cpp
//Lets create an arithmetic by using templates, why not?
//We're not allowed to use builtin compiler math operations
//Yes, this uses sifinae
struct Z {
enum { ToInt = 0 };
};
template<typename T>
struct S {
input:not(:checked) + input:not(:checked) + input:not(:checked) + input:checked +
div:before {
content: "1";
}
input:not(:checked) + input:not(:checked) + input:checked + input:not(:checked) +
div:before {
content: "2";
}
input:not(:checked) + input:not(:checked) + input:checked + input:checked +
div:before {