Skip to content

Instantly share code, notes, and snippets.

View Alejandro-MartinG's full-sized avatar
:shipit:
Focusing

Alejandro Alejandro-MartinG

:shipit:
Focusing
View GitHub Profile
@Alejandro-MartinG
Alejandro-MartinG / oh-my-fish.md
Created November 30, 2018 19:54 — forked from frfahim/oh-my-fish.md
Install fish shell and oh-my-fish on ubuntu

First install fish shell on your system

sudo apt-get update
sudo apt-get install fish

Or install fish via ppa

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update

sudo apt-get install fish``

@Alejandro-MartinG
Alejandro-MartinG / ssmtp_email_conf
Created October 22, 2018 17:33
ssmtp email configuration on Ubuntu
sudo apt-get install bsd-mailx
sudo apt-get install ssmtp
sudo vim /etc/ssmtp/ssmtp.conf
I have added these lines in config file:
# Config file for sSMTP sendmail
TSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt
@Alejandro-MartinG
Alejandro-MartinG / ssmtp_email_conf
Created October 22, 2018 17:31
ssmtp email configuration on Ubuntu,
sudo apt-get install bsd-mailx
sudo apt-get install ssmtp
sudo vim /etc/ssmtp/ssmtp.conf
I have added these lines in config file:
# Config file for sSMTP sendmail
TSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@Alejandro-MartinG
Alejandro-MartinG / it-ebooks.rb
Created March 12, 2016 23:51
Scraping web "http://it-ebooks.info/" with ruby for personal private use.
require 'tweakphoeus'
require 'nokogiri'
class Ebooks
URL = "https://it-ebooks.info"
BOOK_URL = "#{URL}/book"
N_BOOKS = 6972
def initialize
chrome.webRequest.onHeadersReceived.addListener(
function (details) {
return {
responseHeaders: details.responseHeaders.filter(function(header) {
return (header.name.toLowerCase() !== 'x-frame-options');
})
};
}, {
urls: ["<all_urls>"]
}, ["blocking", "responseHeaders"]);