
Download this fantastic presentation, and you will see there is no need for Prezi! Download
me online
Download this fantastic presentation, and you will see there is no need for Prezi! Download
There is a hidden method to share your WiFi over Ethernet in the latest Gnome.
nm-connection-editor
in your terminal.Shared to other computers
by clicking the Method drop-down menu.Shared WiFi LAN
as the Connection name at the topThis script aims to mount a Bitlocker encrypted drive in linux.
The binaries can be downloaded at https://pkgs.org/download/dislocker.
#!/bin/bash # Dislocker binary can be downloaded from https://pkgs.org/download/dislocker # All credits to Cesário Garcia Mil-Homens - www.cesariogarcia.com if [ ! -d "/media/mount" ] && [ ! -d "/media/bitlocker" ]; then sudo mkdir /media/bitlocker sudo mkdir /media/mount else sudo fdisk -l read -n1 -r -p "Press any key to continue..." key echo "Insert volume and partition eg. sdaX" read volume echo "Enter password" read -s password sudo dislocker -V /dev/$volume -u$password -- /media/bitlocker sudo mount /media/bitlocker/dislocker-file /media/mount/ -o loop echo "Press u to umount device" read key if echo "$key" | grep -iq "^u" ;then sudo umount /media/mount sudo umount /media/bitlocker fi fi
Algoritmo de validação de um NIF em C++
#include <iostream>
int nif, n, nif_d[8], resto, dig_controlo, verificacao;
int resultado=0;
int main(){
printf("Insira o seu NIF \n");
scanf("%d",&nif);
//Separação de dígitos num array
for(n=9;n>=1;n--){
nif_d[n]=nif%10;
nif/=10;
}
//Atribui o último dígito à variável verificacao
verificacao = nif_d[9];
//Verificar se o NIF possuí 9 dígitos e consequente verificação dos primeiros dígitos
if((nif<=999999999||nif>99999999)&&((nif_d[1]==1||nif_d[1]==2||nif_d[1]==3)||(nif_d[1]==4&&nif_d[2]==5)||(nif_d[1]==5)||(nif_d[1]==6)||(nif_d[1]==7&&nif_d[2]==0)||(nif_d[1]==7&&nif_d[2]==4)||(nif_d[1]==7&&nif_d[2]==5)||(nif_d[1]==7&&nif_d[2]==1)||(nif_d[1]==7&&nif_d[2]==2)||(nif_d[1]==7&&nif_d[2]==7)||(nif_d[1]==7&&nif_d[2]==8)||(nif_d[1]==7&&nif_d[2]==9)||(nif_d[1]==8)||(nif_d[1]==9&&nif_d[2]==0)||(nif_d[1]==9&&nif_d[2]==1)||(nif_d[1]==9&&nif_d[2]==8)||(nif_d[1]==9&&nif_d[2]==9))){
//Calcular o valor da soma da multiplicação dos dígitos
for(n=9;n>=2;n--){
resultado+=nif_d[10-n]*n;
}
//Calcular o valor do resto
resto=resultado%11;
//Cálculo do dígito de controlo
if(resto<2){
dig_controlo=0;
}else{
dig_controlo=11-resto;
}
//Verificação com o dígito de controlo
if(dig_controlo==verificacao){
printf("O NIF é válido\n");
}else{
printf("O NIF é inválido\n");
}
}else{
printf("O NIF é inválido\n");
}
}
Just copy the code below to script.bat to where you want, execute as administrator, this will update the transmission blocklist with ips from Peer Block (http://www.peerblock.com/).
Just follow the instructions below in the configuration to download wget and gzip.
::This script creates the same lists as peerblock http://www.peerblock.com/, it outputs a file that you ::can use on Transmission automatically. ::This script was created by Cesário Garcia Mil-Homens - http://www.cesariogarcia.com just for the fun. ::TiBL4Win - v1.0 ::CONFIGURATION - WARNING THE DIRECTORIES SHOULD ALREADY EXIST. ::In order for this script to work wget.exe and gzip.exe should be in the tmp directory do not remove them ::Download wget from: https://eternallybored.org/misc/wget/ ::Download gzip from: http://gnuwin32.sourceforge.net/packages/gzip.htm ::Setup Transmission Blocklist folder. set destination_folder="%appdata%\transmission\blocklists" ::DO NOT EDIT BELOW THIS LINE unless you know what you are doing pushd "%~dp0" cd tmp wget -O - "http://list.iblocklist.com/?list=bt_ads&amp;amp;amp;fileformat=p2p&amp;amp;amp;archiveformat=gz" &amp;amp;gt; bt_ads.txt.gz wget -O - "http://list.iblocklist.com/?list=bt_level1&amp;amp;amp;fileformat=p2p&amp;amp;amp;archiveformat=gz" &amp;amp;gt; bt_level1.txt.gz wget -O - "http://list.iblocklist.com/?list=bt_spyware&amp;amp;amp;fileformat=p2p&amp;amp;amp;archiveformat=gz" &amp;amp;gt; bt_spyware.txt.gz gzip -d *.gz copy *.txt lists copy lists %destination_folder% del lists del *.txt del *.gz
Recentemente pretendi que o meu telemóvel lesse alguns livros, comecei por utilizar o motor de TTS da Google e para além de ser pouco natural, estava em Português do Brasil.
Após alguma pesquisa, encontrei uma solução grátis e muito boa, que ultrapassa largamente em qualidade algumas app’s pagas da playstore. O software foi criado por um grupo de Húngaros e baseia-se no motor de TTS da Nuance.
Após a instalação da app, esta ficará como motor TTS predefinido do nosso dispositivo Android.
Guia de instalação
In Windows you can get free VPN software like Anchor Free, SoftFlux and Expat Shield.
But what about Linux?
US – http://www.anchorfree.com/
US – http://www.spotflux.com/
UK – http://www.expatshield.com/
So how can we create a VPN that gives us the country IP we want?
So things we will install
Let’s install them on terminal (Ctrl + Alt + t)
sudo apt-add-repository ppa:ubun-tor/ppa sudo apt-get update sudo apt-get install tor privoxy vidalia
If you want a UK ip everytime you start Tor open Vidalia and go to “View the network”. Here you will see a bunch of relays, sort them by country and copy the nicknames of wich you want to look like the ones below.
ExitNodes TorLand2, TorLand1, TorLand5, st0nerhenge, c00psTOR, EnfluraneNode, microlah, YoureOnCCTV, hamtor StrictExitNodes 1
Go to terminal
sudo gedit /etc/tor/torrc
Insert the lines you created save and exit.
Start tor
tor &
Go to Network GUI -> Proxy
Socks Server: 127.0.0.1
Port: 9050
If you want to logoff the VPN set proxy to none and stop tor
sudo killall tor
Um script para linux que permite utilizar as listas do Peerblock.
Estas listas podem ser utilizadas no Transmission.
#!/bin/bash #This script creates the same lists as peerblock http://www.peerblock.com/, it outputs a file that you #can use on Transmission under Edit -> Preferences -> Privacy -> Blocklist. In the first time copy the #http link and use it. All lists are from http://www.iblocklist.com #This script was created by Cesário Garcia Mil-Homens - http://www.cesariogarcia.com just for the fun. #PBLS4Lin - v1.0 #CONFIGURATION - WARNING THE DIRECTORIES SHOULD ALREADY EXIST. #Insert here the dir where is your Dropbox/Google Drive/etc public folders or you local server with apache #Using Dropbox #destination_folder="$HOME/Dropbox/Public" #Using localhost destination_folder="/var/www/peerblock" #Insert here your own temporary download folder, do not use /tmp temp="$HOME/tmp" #DO NOT EDIT BELOW THIS LINE clear echo "Peerblock Lists - Automatic Uptades for Transmission" echo "My destination folder is $destination_folder and my temporary download folder is $temp is this correct? (y/n)" function download() { sudo cd $temp sudo wget -O - "http://list.iblocklist.com/?list=bt_ads&fileformat=p2p&archiveformat=gz" > bt_ads.txt.gz sudo wget -O - "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" > bt_level1.txt.gz sudo wget -O - "http://list.iblocklist.com/?list=bt_spyware&fileformat=p2p&archiveformat=gz" > bt_spyware.txt.gz sudo gunzip *.gz } function combine() { sudo cat bt_ads.txt bt_level1.txt bt_spyware.txt > peerblock.txt sudo rm bt_ads.txt sudo rm bt_level1.txt sudo rm bt_spyware.txt } function upload() { sudo mv -f peerblock.txt $destination_folder } read op case $op in y) download; combine; upload;; *) exit;; esac
O meu certificado do MIT 😀
Aqui estão as estatísticas oficiais do curso do MIT 154763 pessoas que se registaram e apenas acabaram 7157, eu sou uma destas 7157 😀
Course statistics: 6.002x had 154,763 registrants. Of these, 69,221 people looked at the first problem set, and 26,349 earned at least one point on it. 13,569 people looked at the midterm while it was still open, 10,547 people got at least one point on the midterm, and 9,318 people got a passing score on the midterm. 10,262 people looked at the final exam while it was still open, 8,240 people got at least one point on the final exam, and 5,800 people got a passing score on the final exam. Finally, after completing 14 weeks of study, 7,157 people have earned the first certificate awarded by MITx, proving that they successfully completed 6.002x.
https://verify.edxonline.org/cert/7645de2e02614b20a492757e4cad049d
Em Portugal e em muitos outros países o site da BBC não nos permite ver o programa de ciência e tecnologia BBC Click, descobri um excelente canal que de semana a semana coloca online no youtube o programa da semana. Vale apena ver.
Canal:
Programa BBC Click do dia 07-04-2012