Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@jalcine
jalcine / gist:509b4cc280226eec5c49876106239d29
Created January 8, 2017 17:13 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
user = insert(:user)
insertedFilterList = insert_list(4, :filter, %{owner_user: user})
|> Enum.into([], fn filter -> filter.id end)
|> Enum.reverse
ownedFilters = Repo.preload(user, :filters).filters
|> Enum.into([], fn filter -> filter.id end)
assert ownedFilters == insertedFilterList
(lldb) platform select remote-linux
Platform: remote-linux
Connected: no
(lldb) platform connect connect://localhost:1993
Platform: remote-linux
Triple: x86_64-pc-linux
OS Version: 4.4.0 (4.4.0-23-generic)
Kernel: #41-Ubuntu SMP Mon May 16 23:04:25 UTC 2016
Hostname: arno.jalcine
Connected: yes
@jalcine
jalcine / wps_openwrt.sh
Created May 2, 2016 18:15 — forked from alghanmi/wps_openwrt.sh
WPS on OpenWRT -- Enabling Wi-Fi Protected Setup on OpenWRT
##
## WPS on OpenWRT
## This script enables Wi-Fi Protected Setup on OpenWRT.
##
## Resources
## http://wiki.openwrt.org/doc/uci/wireless#wps.options
##
#Install the full wpad package
opkg update
@jalcine
jalcine / landrush.rst
Created April 26, 2016 20:33 — forked from neuroticnerd/landrush.rst
Vagrant landrush DNS plugin tips and troubleshooting

landrush

landrush is an excellent Vagrant plugin if you are trying to develop or test in a multi-machine VM environment. It works by spinning up a small local DNS server and registering the private network IPs of each machine during vagrant up so that they can be accessed via their hostname in both the host machine as well as the other guest machines. A great bonus of using landrush is that the VMs can be defined in separate Vagrantfiles (e.g. if you have separate git repos for building different machines).

useful commands

  • vagrant landrush status - show whether the DNS server
# Command run by neomake: mix compile.elixir --warnings-as-errors ~prj/web/models/hashtag.ex
Neomake: mix stdout: Compiled lib/api.ex
Neomake: mix stdout:
Neomake: mix stdout done.
Neomake: mix processing 2 lines of output
Neomake: mix stdout: Compiled web/web.ex
Neomake: mix stdout:
Neomake: mix stdout done.
Neomake: mix processing 2 lines of output
Neomake: mix stdout:
@jalcine
jalcine / nginx.conf
Created February 27, 2016 00:48 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
factory :user do
name "Jessie Pinkman"
email
password "secret"
password_confirmation "secret"
factory :group_admin, parent: :user do
after(:create) do |user, evaluator|
group = evaluator.respond_to? :group ? evaluator.group : create(:group)
user.add_role :admin, group
factory :user do
name "Jessie Pinkman"
email
password "secret"
password_confirmation "secret"
trait :group_admin do
ignore do
group = nil
end