Skip to content

Instantly share code, notes, and snippets.

@antoniomerlin
antoniomerlin / ufw_cheatsheet
Last active July 26, 2019 20:53
ufw cheatsheet
Installation
sudo apt install ufw
GUI version
sudo apt install gufw
Enable firewall
sudo ufw enable
Check rules & status
@antoniomerlin
antoniomerlin / hdmi_second_monitor_setup.sh
Created February 20, 2019 12:26
Script for setting up second monitor using NVIDIA hdmi to a DVI monitor or hdmi monitor on ubuntu as for my earlier setup https://askubuntu.com/questions/656280/this-installation-did-not-install-the-cuda-driver/656327#656327
#######################################
# to setup second screen monitor
#######################################
optirun true
sleep 5
export DISPLAY=:8.0
sleep 3
xrander -q
sleep 2
@antoniomerlin
antoniomerlin / RxJava.md
Created February 8, 2018 18:39 — forked from cesarferreira/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@antoniomerlin
antoniomerlin / centos7.sh
Created January 31, 2017 17:39 — forked from yyang/centos7.sh
centos 7 pptpd firewalld
#!/bin/sh
#
# pptpd installation script on my own CentOS 7 box.
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules
#
# Author: 2015 Steve Yang <me@iyyang.com>
# The script comes with ABSOLUTELY NO WARRANTY.
@antoniomerlin
antoniomerlin / .htaccess
Created February 7, 2016 21:01 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@antoniomerlin
antoniomerlin / Fetch.sublime-settings
Last active September 4, 2015 19:53 — forked from dustinhorton/Fetch.sublime-settings
fetch settings for sublime text 2
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.min.js",
"jquery-ui-effects" : "https://raw.github.com/jquery/jquery-ui/master/ui/jquery.effects.core.js",
"jquery-mobile-vmouse" : "https://raw.github.com/jquery/jquery-mobile/master/js/jquery.mobile.vmouse.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",
"jquery-url" : "https://raw.github.com/allmarkedup/jQuery-URL-Parser/master/jquery.url.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",