Skip to content

Instantly share code, notes, and snippets.

View enapupe's full-sized avatar

Iacami Gevaerd enapupe

View GitHub Profile
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
curl 'http://www.t-bad.com.br/web/content/imagem/like.php' -H 'Pragma: no-cache' -H 'Origin: http://www.t-bad.com.br' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Host: www.t-bad.com.br' -H 'Accept-Language: en-US,en;q=0.8,pt-BR;q=0.6,pt;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: PHPSESSID=jr0i6ioedo4michc7mbh0k9613; __utma=134623220.525163634.1375726587.1375729236.1375810789.3; __utmb=134623220.1.10.1375810789; __utmc=134623220; __utmz=134623220.1375729236.2.2.utmcsr=facebook.com|utmccn=(referral)|utmcmd=referral|utmcct=/; SnapABugRef=http%3A%2F%2Fwww.t-bad.com.br%2Fimagem%2F32%20; SnapABugHistory=3#; SnapABugVisit=76e5a9fa-f541-4c68-821b-423f7011db63-400110792368650' -H 'Connection: keep-alive' -H 'Referer: http://www.t-
enapupe@enapupe:~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +56.0°C (high = +80.0°C, crit = +98.0°C)
Core 0: +53.0°C (high = +80.0°C, crit = +98.0°C)
Core 1: +56.0°C (high = +80.0°C, crit = +98.0°C)
Core 2: +55.0°C (high = +80.0°C, crit = +98.0°C)
Core 3: +53.0°C (high = +80.0°C, crit = +98.0°C)
@enapupe
enapupe / log
Last active December 16, 2015 16:18
log
.-"""""""""""""""""""""""""-.
/ .----------------------. /|
/ / .--. .--. .-. .--. / / |
/ / (__ / | /__| /__/ / / |
/ / `)| / / // / / |
/ / '---' '--' ' '' / / ;
| \_____________________.' / .
|'._______________________.;| .
| , .
| ; .
@enapupe
enapupe / css64.sh
Last active December 14, 2015 16:58
#! /bin/sh
if [ $# -ne 2 ]
then
echo "Usage - $0 file-name"
exit 1
fi
if [ -f "$1.$2" ]
then
echo ".$1 {background-image:url('data:image/$2;base64,`cat $1.$2 | base64 -w 0 $1.$2 `')}" | xclip -selection clipboard
@enapupe
enapupe / controller.js
Created September 29, 2014 15:10
PopUp opener directive for angularjs
"use strict";
myApp.controller("SomeCtrl", function($scope){
$scope.callback = function(){
// do something
};
$scope.url = "http://some/popup";
});
<?php
//error_reporting(0);
$validation = array(
'email' => 'Digite um e-mail!',
'nome' => "Digite seu nome!"
);
foreach($validation as $key => $message){
if (empty($_POST[$key])){
echo json_encode(array('message' => $message, 'status' => 'fail'));
exit;
//drop utm
if(/utm_/.test(location.search)&&window.history.replaceState){var oldUrl=location.href,newUrl=oldUrl.replace(/\?([^#]*)/,function(b,a){return(a=a.split("&").map(function(a){return!/^utm_/.test(a)&&a}).filter(Boolean).join("&"))?"?"+a:""});newUrl!=oldUrl&&window.history.replaceState({},"",newUrl)};
(function($){
})(jQuery);
function s1mp_cep($cep) {
try {
$get = file_get_contents("http://cep.s1mp.net/" . $cep);
} catch (Exception $e) {
return false;
}
if ($json = json_decode($get)) {
if ($json->result === true) {
return array('cidade' => $json->data->cidade, 'uf' => $json->data->uf, 'logradouro' => $json->data->logradouro, 'bairro' => $json->data->bairro, 'tp_logradouro' => $json->data->tp_logradouro);>tp_logradouro);
}
<?php
namespace Obiz\Challenges\CashMachine;
class WithdrawException extends \Exception {
}
class CashMachine {