Skip to content

Instantly share code, notes, and snippets.

View rduarte's full-sized avatar
🏠
Working from home

Ricardo Duarte rduarte

🏠
Working from home
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
https://e-gov.betha.com.br/protocolo/01038-173/download?path=L2JldGhhMDYvcmVzb3VyY2VzL3Byb3RvY29sby9leHBvcnRfZGF0YV9mbWtfdG1wL2V4cG9ydC0y%20MDIxMTAyMjAxMjI0NTg5MC1yaWNhcmRvZHVhcnRlMi56aXA=&fileName=export-20211022033408170.zip&token=RTJJaDBvdG8wSktQZG9kUEhuZ2RLNVVzNmdSYlRSNEE=
@rduarte
rduarte / csv-to-json.php
Created January 18, 2020 15:37 — forked from devfaysal/csv-to-json.php
CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses the csv file of this gist
*/
$feed="https://gist.githubusercontent.com/devfaysal/9143ca22afcbf252d521f5bf2bdc6194/raw/ec46f6c2017325345e7df2483d8829231049bce8/data.csv";
//Read the csv and return as array
$data = array_map('str_getcsv', file($feed));
//Get the first raw as the key
$keys = array_shift($data);
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><iframe src="https://fast.wistia.net/embed/iframe/l30pohiyi6?videoFoam=true" title="016716 - Primeiro acesso Video" allowtransparency="true"
frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="100%" height="100%"></iframe></div>
</div>
<script src="https://fast.wistia.net/assets/external/E-v1.js" async></script>
@rduarte
rduarte / gist:0c7c7a06d21f4d4f3defc8ba02daf2df
Last active October 30, 2017 17:39
FreeNAS_ZFS_On_Linux
sudo apt-get update
sudo apt install linux-headers-$(uname -r)
sudo apt-get install zfs-dkms
sudo apt-get install zfsutils-linux
sudo zpool import -f NAS
<?php
$ch = curl_init();
$login = "http://192.168.10.223/rep.html?pgCode=7&opType=1&lblId=0&lblLogin=rep&lblPass=362190";
curl_setopt($ch, CURLOPT_URL, $login);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec ($ch);
curl_setopt($ch, CURLOPT_URL, 'http://192.168.10.223/rep.html?pgCode=8&opType=5&lblId=2&lblDataI=01%2F11%2F15+00%3A00&lblDataF=01%2F12%2F15+00%3A00');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@rduarte
rduarte / UbuntuPMT-12.04.sh
Last active December 15, 2015 06:49
Distribuição criada usando como base o Ubuntu Minimal 12.04 LTS.
#!/bin/bash
sudo apt-get install -y ssh
sudo apt-get install -y xorg
sudo apt-get install -y lxde
sudo apt-get install -y slim
sudo apt-get remove -y lxdm
sudo apt-get install -y firefox firefox-locale-pt
sudo apt-get install -y flashplugin-installer
sudo apt-get install -y icedtea-7-plugin
echo -e "\n\n** Atualizando apt-get"
sudo apt-get update -y
echo -e "\n\n** Instalando git"
sudo apt-get install -y git-core
echo -e "\n\n** Instalando apache e mod_rewrite"
sudo apt-get install -y apache2
sudo a2enmod rewrite
sudo service apache2 restart
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y ssh
wget http://temp.nuntec.com.br/gta-gestor/ldc-key.tar.gz
tar -xvzf ldc-key.tar.gz
rm ldc-key.tar.gz
sudo apt-get install -y git-core
# Instalar o Slitaz JustX
tazpkg recharge
tazpkg get-install java-jre
tazpkg get-install ntp
tazpkg get-install linux-input-touchscreen
tazpkg get-install linux-usb-misc
tazpkg get-install usbutils
tazpkg get-install acpid
tazpkg get-install linux-acpi
# Instalar no o Ubuntu Server 10.04 32bits - Offline
# 1. Nome do host: nuntec-xx
# 2. Desmarcar TODOS os daemons
# 3. Definir primeiro usuário:
# Usuário: deploy
# Senha: 14ggcb
# Instalar todos os pacotes DEB
# sudo dpkg -i ldc-server/debs/*