Skip to content

Instantly share code, notes, and snippets.

View dcalixto's full-sized avatar
🎯
Focusing

Daniel dcalixto

🎯
Focusing
View GitHub Profile
apt-get -y update
apt-get -y install curl git-core python-software-properties
# nginx
add-apt-repository ppa:nginx/stable
apt-get -y update
apt-get -y install nginx
service nginx start
@dcalixto
dcalixto / double_polymorphism.rb
Created November 18, 2016 02:36 — forked from gerred/double_polymorphism.rb
Doubly Polymorphic Join Models, for fun and profit
class Delivery < ActiveRecord::Base
belongs_to :deliverable, :polymorphic => true
belongs_to :receivable, :polymorphic => true
has_many :delivery_impressions
has_many :users, :through => :delivery_impressions
belongs_to :sender, :class_name => 'User', :foreign_key => :sender_id
end
class DeliveryImpression < ActiveRecord::Base

Cheatsheets

NetworkOptions

@author Tim Fox
@dcalixto
dcalixto / gist:650c86e96fcc74ff34c9f33ecfd76310
Created November 13, 2016 05:51 — forked from jendiamond/gist:6128723
Creating your own Gem & Command Line Interface Using Bundler

Presentation slides

Create a Gem - Make it a CLI - Add Rspec Tests

Create a Gem - Make it a Command Line Interface - Add Rspec Tests Using Bundler & Thor

#Creating your own Gem

  1. Run this command in your Terminal. This creates and names all the files you need for your gem. We are going to create a Lorem Ipsum Generator; you can call it whatever you want but seeing as we are creating a Lorem Ipsum generator we'll call it lorem. Read about gem naming conventions.
@dcalixto
dcalixto / web-dev-links.md
Created November 13, 2016 05:50
Web Dev Links

I18n Cheatsheet

t('my.messages.hello')

# same as 'my.messages.hello'
t(:hello, scope: 'my.messages')
t(:hello, scope: [:my, :messages])
@dcalixto
dcalixto / linux_tools.md
Created November 13, 2016 05:47 — forked from crittelmeyer/linux_tools.md
linux tools cheatsheet

Linux tools to know

Built-in Mac OS tools

  • ls - list directory contents
  • wc - word, line, character, and byte count
  • cp - copy files
  • mv - move files
  • rm - remove directory entries
  • chmod - change file modes or Access Control Lists
  • chown - change file owner and group
@dcalixto
dcalixto / Toolbox.md
Created November 13, 2016 05:45 — forked from dustyfresh/Toolbox.md
Toolbox is a list of tools I use often.

Toolbox

Tools I use on a daily basis:

  • dnsmap - DNS record enumeration using dictionary brute forcing. I have a host list. Find all kinds of infrastructure with this tool. Opensource.

  • Spiderfoot - Full intelligence gathering suite. Open source. Nice UI.

  • Arachni - Web application scanner. Has a nice web interface and can run distributely.

  • WPScan - WordPress specific attack tool

@dcalixto
dcalixto / Git-Cheatsheets.md
Created November 13, 2016 05:44 — forked from nerdalert/Git-Cheatsheets.md
Git Cheat Sheets

Git Cheat Sheets and Examples