Skip to content

Instantly share code, notes, and snippets.

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

Pedro Pombeiro pedropombeiro

🏠
Working from home
View GitHub Profile
@pedropombeiro
pedropombeiro / install-ubuntu.sh
Last active March 25, 2020 21:46
Set up dev environment in Ubuntu
#!/bin/sh
rm -f ~/Downloads/*
# Adapt Firefox settings
def_Pfile=`cat "$HOME/.mozilla/firefox/profiles.ini" | sed -n -e 's/^.*Path=//p' | head -n 1`
# Enable FIDO U2F in Firefox
echo "user_pref(\"security.webauth.u2f\", \"true\");" >> $HOME/.mozilla/firefox/$def_Pfile/prefs.js
sudo apt update
## function to retrieve the Windows Product Key from any PC
## by Jakob Bindslet (jakob@bindslet.dk)
function Get-WindowsKey {
param ($targets = ".")
$hklm = 2147483650
$regPath = "Software\Microsoft\Windows NT\CurrentVersion"
$regValue = "DigitalProductId"
Foreach ($target in $targets) {
$productKey = $null
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 27, 2024 20:46
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@JunichiIto
JunichiIto / alias_matchers.md
Last active June 16, 2024 23:01
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@laurenorsini
laurenorsini / server.conf
Last active June 2, 2023 15:45
OpenVPN configuration for /etc/openvpn/server.conf
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints