Skip to content

Instantly share code, notes, and snippets.

@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active April 19, 2024 16:03
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@Fedcomp
Fedcomp / install_phantomjs.sh
Created June 28, 2016 14:30
Install fresh phantomjs (linux-x86_64)
#!/usr/bin/env bash
BUILD_REGEX="phantomjs-[0-9\.]+-linux-x86_64"
PHANTOM_VERSION=$(curl -s phantomjs.org/download.html | grep -oE $BUILD_REGEX | head -n 1)
PHANTOM_FILENAME="$PHANTOM_VERSION.tar.bz2"
PHANTOM_URL="https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_FILENAME"
curl -L $PHANTOM_URL | \
tar xjf - -C /usr/local/bin --strip-components 2 $PHANTOM_VERSION/bin/phantomjs
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@Mikke
Mikke / 01_step.sh
Created March 13, 2012 20:35
Rails 3 has_many use checkboxes and multiple select in the form
rails g scaffold Book title:string description:text
rails g scaffold Pubhouse title:string address:text
rails g model BookPubhouse book_id:integer pubhouse_id:integer
rake db:migrate
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')