Skip to content

Instantly share code, notes, and snippets.

View achalbi's full-sized avatar

Achal B I achalbi

  • Bangalore, India
View GitHub Profile
@achalbi
achalbi / rspec_model_testing_template.rb
Created March 4, 2017 06:09 — forked from PWSdelta/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@achalbi
achalbi / serverless.yml
Created February 18, 2019 17:35 — forked from DavidWells/serverless.yml
DynamoDB custom index serverless.yml example
service: service-name
provider:
name: aws
runtime: nodejs6.10
functions:
myfunc:
handler: handler.myfunc
@achalbi
achalbi / System Design.md
Created July 5, 2019 09:06 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@achalbi
achalbi / README.md
Created September 28, 2019 01:58 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@achalbi
achalbi / spree.rb
Created May 9, 2021 04:54 — forked from ArunMichaelDsouza/spree.rb
Solidus config for S3 file upload + CDN (Cloudfront) delivery
# Upload new product images to S3 and deliver via Cloudfront
Spree.config do |config|
attachment_config = {
s3_credentials: {
access_key_id: ENV.fetch("S3_ACCESS_KEY"),
secret_access_key: ENV.fetch("S3_SECRET"),
bucket: ENV.fetch("S3_BUCKET"),
},
@achalbi
achalbi / install_poppler.sh
Created December 6, 2021 09:16 — forked from AvnerCohen/install_poppler.sh
Install popller and pdfparser on Centos 6 / Amazon AMI
#!/bin/bash -e
set -x
# Poppler is used by resume parser for a faster PDF data extraction.
# Deploy is a bit man ual and complicated because of the C libs involved
# the fact no pip is used (anaconda and not virtualenev) and that the
# Cmake version eeds to be be udpated as part of it.
CMAKE_VERSION='3.6.2'
POPPLER_VERSION="poppler-0.67.0"
TARGET_DIR='/opt/poppler'
@achalbi
achalbi / gist:1d71e7b718f165419ca8ea6a9e715834
Created December 7, 2021 02:28 — forked from IaroslavR/gist:cca8170357adebefbe97
install last poppler to Amazon Linux
sudo yum install fontconfig fontconfig-devel
wget http://downloads.sourceforge.net/project/openjpeg.mirror/1.5.0/openjpeg-1.5.0.tar.gz?r=&ts=1443868025&use_mirror=netcologne
tar -xvf openjpeg-1.5.0.tar.gz\?r\=
cd openjpeg-1.5.0
./configure
make
sudo make install
cd ..
POPPLER='poppler-0.47.0'
wget https://poppler.freedesktop.org/$POPPLER.tar.xz