- Shut down your Mac, then press and hold the power button until "Loading startup options" appear.
- Select "Options"
- In the menu on top of the screen, choose "Utilities" -> "Startup Security Utility".
- Click "Security Policy"
- Select "Reduced Security" and check "Allow user management of kernel extensions from identified developers".
- Reboot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Easy script to create OpenVPN client configuration with the user, pre-generating user's | |
# RSA key and certificate. | |
# | |
# Configuration template must exist in the same directory, with only missing part: certificates. | |
# | |
# (c) Dmytro Kovalov, 2015 | |
# | |
cd $(dirname ${BASH_SOURCE[0]}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download | |
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
# unzip | |
unzip ngrok-stable-linux-amd64.zip | |
# move to /usr/local/bin | |
sudo mv ngrok /usr/local/bin |
- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# index.js.haml | |
- js = escape_javascript(page_entries_info @properties) | |
$("#results_page_entries_info").html("#{ js }"); | |
- js = escape_javascript(paginate @properties) | |
$("#results_paginate").html("#{ js }"); | |
- js = escape_javascript(render @properties) | |
$("#results_properties").html("#{ js }"); | |
# properties_controller.rb | |
class PropertiesController < ApplicationController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# and whatever other gems you need | |
gem 'resque', '~> 1.24.1' | |
gem 'unicorn', '~> 4.6.2' |
Uninstall the wkhtmltopdf package:
apt-get remove wkhtmltopdf --purge
cd /usr/local/bin
sudo curl -C - -O http://download.gna.org/wkhtmltopdf/obsolete/linux/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
sudo tar -xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
rm wkhtmltopdf-0.9.9-static-amd64.tar.bz2
ln -s wkhtmltopdf-amd64 wkhtmltopdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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') |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
Note: this was written in April/May 2014 and the API may have changed since
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Getting Started Form</title> | |
<!-- The required Stripe lib --> | |
<script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
<!-- jQuery is used only for this example; it isn't required to use Stripe --> |
NewerOlder