Skip to content

Instantly share code, notes, and snippets.

View dmexs's full-sized avatar

Emeka Anyanwu dmexs

View GitHub Profile
@dmexs
dmexs / package.json
Last active January 22, 2023 19:59
NestJS Webpack Multiple Configs
{
"name": "PROJECT",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"start": "webpack --mode=development --env watch=true debug=true",
"build": "webpack --mode=production",
@dmexs
dmexs / example_controller.rb
Last active April 9, 2018 00:43 — forked from TheKidCoder/example_controller.rb
Rails - Sanitize Ordering Params
class ClientsController
include OrderingHelpers
def index
# order_by sanitation should work fine here, with sanitation to created_by if invalid
@clients = Clients.order(sanitized_ordering).where(user_id: current_user.id)
# trying to order_by sales.date for example will fail here even if it's valid if the current controller is not ClientController
@clients = Clients.joins(:sales).order(sanitized_ordering.where(user_id: current_user.id)
@dmexs
dmexs / gist:c17a916395dc746e0293
Created September 15, 2015 13:49
learning rails gemfile.lock
GIT
remote: git://github.com/twbs/bootstrap-sass.git
revision: bf9b497538b8c74e9cb29ba8a754184ebee499dd
ref: bf9b497538b8c74e9cb29ba8a754184ebee499dd
specs:
bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
GEM