Skip to content

Instantly share code, notes, and snippets.

Avatar

Sunny R. Juneja sunnyrjuneja

View GitHub Profile
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@bishboria
bishboria / springer-free-maths-books.md
Last active Jul 1, 2022
Springer made a bunch of books available for free, these were the direct links
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Jun 29, 2022
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@schickling
schickling / Rakefile
Last active Jun 26, 2022
Activerecord without Rails
View Rakefile
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)
@soheilhy
soheilhy / nginxproxy.md
Last active Jun 26, 2022
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active Jun 22, 2022
Arel cheatsheet on Steroids
View arel_cheatsheet_on_steroids.md

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

View folder-structure.md

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

View types.markdown

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@hopsoft
hopsoft / Dockerfile
Last active May 22, 2022
Dockerize your Rails app
View Dockerfile
FROM ruby:3.0-alpine
RUN apk add --no-cache --update \
ack \
bash \
build-base \
curl \
git \
htop \
less \