Skip to content

Instantly share code, notes, and snippets.

View rojosinalma's full-sized avatar
🍜

Rojo rojosinalma

🍜
View GitHub Profile
@justinweiss
justinweiss / filterable.rb
Last active January 30, 2025 13:06
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with names based on the keys in <tt>filtering_params</tt>
# with their associated values. For example, "{ status: 'delayed' }" would call
@pascalpoitras
pascalpoitras / 1.md
Last active May 30, 2025 18:02
My WeeChat configuration

This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.

@stamparm
stamparm / output.txt
Last active March 5, 2019 21:44
Sample sqlmap run
$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?id=1" -z "ign,flu,bat" --banner -f
sqlmap/1.0-dev-7614c81 - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 10:30:49
[10:30:49] [INFO] testing connection to the target url

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 6, 2025 00:00
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@rstacruz
rstacruz / index.md
Last active May 21, 2025 10:07
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@testcollab
testcollab / an_example_usage.rb
Created September 22, 2011 23:31
Editing a File via the GitHub API v3
require 'editor.rb'
ed = Editor.new('testcollab/rails-test')
if ed.update_file('README.txt', 'my message', 'my new content')
ed.set_author('Scott', '[email protected]')
ed.update_file('README.2.txt', 'my message', 'my new content')
end