This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot /var/site.com.br | |
ServerName site.com.br | |
ServerAlias www.site.com.br | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mencoder $@ -ovc lavc -oac mp3lame -o `echo $@ | cut -d "." -f 1`.avi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assertEquals(x, y) { | |
if(x == y) { | |
console.log('.'); | |
} else { | |
console.log("Failed asserting that "+x+" matches expected '"+y+"'"); | |
} | |
} | |
function testFuncao() { | |
assertEquals(funcao(0), 15); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
set_include_path('/var/www/Loader/library'. PATH_SEPARATOR . get_include_path()); | |
spl_autoload_register(include 'Respect/Loader.php'); | |
use \Respect\Rest\Router; | |
$r3 = new Router; | |
$r3->get('/c/*/*', function($id, $slug){ | |
echo "Conteudo <br/>Id: {$id}<br/> slug: {$slug}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Usuario { | |
public function obterUsuarios() { | |
// Conecta com banco de dados e retorna: "Todos os Usuarios" | |
return "Todos os Usuarios"; | |
} | |
} | |
class Jogo { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.chavao.template; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
/** | |
* | |
* @author Chavão <[email protected]> | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.silos.jsf.util; | |
import java.util.List; | |
import javax.faces.component.UIComponent; | |
import javax.faces.component.UIInput; | |
import javax.faces.component.UIViewRoot; | |
import javax.faces.context.FacesContext; | |
/** | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -F | |
iptables -X | |
iptables -N block | |
iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A block -m state --state NEW ! -i eth0 -j ACCEPT | |
iptables -A block -p tcp --destination-port 80 -j ACCEPT | |
iptables -A block -p tcp --destination-port 8080 -j ACCEPT | |
iptables -A block -p tcp --destination-port 22 -j ACCEPT | |
iptables -A block -j DROP | |
iptables -A INPUT -j block |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SNR Margin - Relação Sinal ruído: | |
- 5db ou menos = ruim, impossível sincronia, quedas frequentes | |
- 8db-13db = regular - sem problemas com sincronia do modem | |
- 14db-22db = muito bom | |
- 23db-28db = excelente | |
- 29db-35db = raro | |
Atenuação: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_data_uri($image_path) { | |
return 'data: '.mime_content_type($image_path).';base64,'.base64_encode(file_get_contents($image_path)); | |
} |