Skip to content

Instantly share code, notes, and snippets.

@sunriax
sunriax / important.php
Created July 15, 2017 17:52
Protection of your PHP environment
<?PHP
// If you GET/POST/REQUEST variables from extern
// Do not forget to protect them from overriding
if( !isset($_GET["test1"]) &&
!isset($_POST["test2"]) &&
!isset($_REQUEST["test3"])) { $test1 = htmlentities($_GET["test1"]);
$test2 = htmlentities($_POST["test2"]); 
$test3 = htmlentities($_REQUEST["test3"]); }
// If you use extern variables in MYSQL please
@sunriax
sunriax / temp_vhdl_proc.vhd
Created July 13, 2017 07:18
VHDL synchron process with asynchron reset
-- VHDL syncrhonous process with an asynchron reset
-- This is very important for the synthesis tool.
process(EN, clk) begin
-- Asynchron Reset 
if(EN = '0') then
-- Synchron Process
elsif(rising_edge(CLK)) then
end if;