Skip to content

Instantly share code, notes, and snippets.

View enapupe's full-sized avatar

Iacami Gevaerd enapupe

View GitHub Profile
@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 / log
Last active December 16, 2015 16:18
log
.-"""""""""""""""""""""""""-.
/ .----------------------. /|
/ / .--. .--. .-. .--. / / |
/ / (__ / | /__| /__/ / / |
/ / `)| / / // / / |
/ / '---' '--' ' '' / / ;
| \_____________________.' / .
|'._______________________.;| .
| , .
| ; .
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)
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-
<?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
@enapupe
enapupe / menu.php
Last active December 23, 2015 13:19
<?php
function get_menu_html($items, $root_id = 0) {
$html = array();
foreach ($items as $item)
$children[$item['parent_id']][] = $item;
// loop will be false if the root has no children (i.e., an empty menu!)
$loop = !empty($children[$root_id]);
@enapupe
enapupe / functions.php
Created September 26, 2013 13:36
functions.
<?php
ob_settings_config {
var $group = "enapupe"; // defines setting groups (should be bespoke to your settings)
var $page_name = "enapupe"; // defines which pages settings will appear on. Either bespoke or media/discussion/reading etc
var $title = "Detrick"; // page title that is displayed
var $nav_title = "Detrick"; // how page is listed on left-hand Settings panel
var $sections = array(
@enapupe
enapupe / GAnalytics.php
Last active March 14, 2019 13:45
Google Analytics API interface for Code Igniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* GAnalytics - Google Analytics PHP Interface for Code Igniter
* Uses google php api https://github.com/google/google-api-php-client
*
* Support material:
* How to set-up the app and configure the analytics profile http://stackoverflow.com/a/10089698/1666071
* Analytics query explorer http://ga-dev-tools.appspot.com/explorer/
*
<?php
function validar_cnpj($cnpj)
{
$cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj);
// Valida tamanho
if (strlen($cnpj) != 14)
return false;
#include <stdio.h>
#include <stdlib.h>
int main(){
int max=3, i=0, j=0, k=0, l=max;
int x[max], y[max], z[max+max];
printf("Digite os valores para o array X\n");
for(i=0; i<max; i++){
scanf("%d", &x[i]);