Skip to content

Instantly share code, notes, and snippets.

View ricardoamaro's full-sized avatar

Ricardo Amaro ricardoamaro

View GitHub Profile
@ricardoamaro
ricardoamaro / ubuntu xenial or zeisty upgrade. patch ​Meltdown and Spectre
Last active January 22, 2018 16:07
Ubuntu xenial or zeisty upgrade to patch ​Meltdown and Spectre. This will repopulate the /etc/apt/sources.list file
export CODENAME=$(lsb_release -c | awk '{print $2}')
echo "###### Ubuntu Main Repos
deb http://pt.archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse
deb-src http://pt.archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse
###### Ubuntu Update Repos
deb http://pt.archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse
deb http://pt.archive.ubuntu.com/ubuntu/ ${CODENAME}-proposed main restricted universe multiverse
###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu ${CODENAME} partner
deb http://security.ubuntu.com/ubuntu ${CODENAME}-security main restricted universe multiverse" | sudo tee /etc/apt/sources.list

Keybase proof

I hereby claim:

  • I am ricardoamaro on github.
  • I am ricardoamaro (https://keybase.io/ricardoamaro) on keybase.
  • I have a public key ASDIr979cOWvfDt7jaEBAzECk4yukBDvOyjwV70J2Zwnvgo

To claim this, I am signing this object:

group: teste1.4
agencia = {
nome_agencia:string, activo:number, cidade:string
exemplo, 42, lisboa
teste, 50, Porto
}
deposito = {
@ricardoamaro
ricardoamaro / drupal8 docker app run example
Created March 14, 2015 22:21
drupal8 docker app run example
$ sudo docker run -i -t -p 80:80 ricardoamaro/drupal8
Unable to find image 'ricardoamaro/drupal8' locally
Pulling repository ricardoamaro/drupal8
4dc3b0e6ffca: Download complete
511136ea3c5a: Download complete
f0dde87450ec: Download complete
76b658ecb564: Download complete
4faa69f72743: Download complete
2103b00b3fdf: Download complete
0d8f0e356b18: Download complete
/* EXEMPLOS EM C PARA:
- Dynamic allocation (malloc) - Alocação de memória
- Linked lists - Listas
- Function arguments by reference - Argumentos de função por referẽncia
- Recursion - Recursão
*/
//------------READ FILES-----------
#include <stdio.h>
#define MAXSTR 255
@ricardoamaro
ricardoamaro / ubuntud7install.sh
Created June 25, 2014 17:50
Drupal Installation Script for Linux Debian/Ubuntu
#!/bin/bash -e
#############################
#
# Auto Install Drupal on Debian/Ubuntu boxes
# Author: ricardo amaro
# https://drupal.org/user/666176
#
# License: http://www.gnu.org/licenses/gpl-2.0.html
#
@ricardoamaro
ricardoamaro / d7install.bash
Last active October 11, 2018 21:09
Drupal Installation Script for Linux Debian/Ubuntu
#!/bin/bash -e
#############################
#
# Auto Install Drupal on Debian/Ubuntu boxes
# Author: ricardo amaro
# https://drupal.org/user/666176
#
# License: http://www.gnu.org/licenses/gpl-2.0.html
#
@ricardoamaro
ricardoamaro / Saucy lxc start debug
Created January 31, 2014 12:05
Saucy lxc start debug
ricardo@workbox:~/drupal-lxc-vagrant-docker$ export VAGRANT_LOG=DEBUG ; vagrant up --provider=lxc
INFO global: Vagrant version: 1.3.5
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/redhat/plugin.rb
INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/suse/plugin.rb
INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/esxi/plugin.rb
INFO manager: Registered plugin: ESXi guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/solaris11/plugin.rb
INFO manager: Registered plugin: Solaris 11 guest.