Skip to content

Instantly share code, notes, and snippets.

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

Marco Montes marcomontes

🏠
Working from home
View GitHub Profile
@marcomontes
marcomontes / ntfs.md
Created July 6, 2023 01:02 — forked from six519/ntfs.md
Read/write NTFS drive on macOS Ventura with Apple silicon processor

Configuring your Mac!

Change security settings

  • 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
@marcomontes
marcomontes / generate_openvpn_config.sh
Created July 17, 2020 00:16 — forked from dmytro/generate_openvpn_config.sh
Script for OpenVPN generate client config file.
#!/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]})
@marcomontes
marcomontes / ngrok-install.sh
Created July 23, 2019 01:16 — forked from ardyantohermawan/ngrok-install.sh
Ngrok Service Ubuntu 16.04
#!/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
@marcomontes
marcomontes / how-to-copy-aws-rds-to-local.md
Created March 15, 2019 15:26 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. 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.
  2. 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
  3. 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
@marcomontes
marcomontes / properties.rb
Created September 19, 2018 16:08 — forked from danielsousaio/properties.rb
Filtering with Filterrific and PgSearch
# 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
@marcomontes
marcomontes / Gemfile
Created November 30, 2016 22:38 — forked from slothelle/Gemfile
Deploying Rails 4 apps with Resque and Redis to Heroku using Unicorn with a Procfile.
# and whatever other gems you need
gem 'resque', '~> 1.24.1'
gem 'unicorn', '~> 4.6.2'
@marcomontes
marcomontes / gist:75aebbde882c71f866ef05045edff732
Last active October 8, 2016 04:39
Fixed removing system installed wkhtmltopdf and using the binary of wkhtmltopdf (Ubuntu 12.04)taken from : http://stackoverflow.com/questions/9672070/wicked-pdf-on-production-server/9687535#9687535

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
@marcomontes
marcomontes / capybara cheat sheet
Last active August 28, 2015 16:15 — forked from zhengjia/capybara cheat sheet
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')
@marcomontes
marcomontes / tinder-api-documentation.md
Last active August 29, 2015 14:27 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

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

API Details

<!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 -->