Skip to content

Instantly share code, notes, and snippets.

@dominikduda
dominikduda / checklist.md
Last active April 4, 2023 19:49 — forked from mateuszwu/checklist.md
Checklist for project

The Checklist

Injection

Injection attacks are #1 at the OWASP Top10.

  • Don’t use standard Ruby interpolation (#{foo}) to insert user inputted strings into ActiveRecord or raw SQL queries. Use the ? character, named bind variables or the ActiveRecord::Sanitization methods to sanitize user input used in DB queries. Mitigates SQL injection attacks.
  • Don't pass user inputted strings to methods capable of evaluating
@dominikduda
dominikduda / generate_wallpaper.r
Last active December 9, 2019 01:50
Multi price chart wallpaper generation
library(pacman)
p_load(alphavantager, ggplot2, quantmod, magrittr, cowplot)
p_load_gh('dominikduda/candlePlotter')
av_api_key("")
layers <- function() {
baseline_layer <- layer(
@dominikduda
dominikduda / excercises2.md
Last active August 21, 2017 18:07
excercises part 2

1. The rectangle

Write program that takes input from user and produces rectangle of # with height equal to user input and width equal to 3. The input should be a number.

Example output for input 2:

###
###

Lottery Platform

  • roles should be defined by rolify
  • to capture emails in development use latter_opener_web
  • for authentication use devise

Client Part

  • on main page see all the items avaialble to bid
  • can search item by name ransack

Filter class skeleton:

class Filter < ActiveRecord::Base
  self.abstract_class = true

  # new column filter_hash, new index user_id and filter_hash, unique
  serialize :nested_region_ids, JSON
  serialize :assigned_user_ids, JSON

  belongs_to :user
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class Program
{