Skip to content

Instantly share code, notes, and snippets.

View mashhoodr's full-sized avatar
🏎️
being awesome!

Mashhood Rastgar mashhoodr

🏎️
being awesome!
View GitHub Profile
add_filter( 'graphql_post_object_connection_query_args', function( $args ) {
$args['no_found_rows'] = false;
return $args;
} );
add_filter( 'graphql_connection_page_info', function( $page_info, $connection ) {
$page_info['total'] = null;
if ( $connection->get_query() instanceof \WP_Query ) {
if ( isset( $connection->get_query()->found_posts ) ) {
$page_info['total'] = (int) $connection->get_query()->found_posts;
@kieetnvt
kieetnvt / Crying with NGINX Regex, IF statement, and module http rewrite.md
Last active October 6, 2020 09:15
Crying with NGINX Regex matching, IF statement and module http rewrite $1 $2 meaning

If Statement and common condition

Syntax:	if (condition) { ... }
Default:	—
Context:	server, location

A condition may be any of the following:

@muhammadfaizan
muhammadfaizan / README.md
Last active January 15, 2019 13:56
Custom AWS Deployments using EC2

Custom AWS Deployments using EC2

In this talk, Mashhood share how we can configure "git push deployments". Using Git and EC2 we can quickly configure a deployment for our selves with minimal efforts. Then he also shares the deployment for S3 alongside this. Watch it on Youtube

Deployment Flow

  1. Create EC2 instance.
  2. Configure SSH alias
  3. Setup the instance
@markerikson
markerikson / redux-archeology-notes.md
Last active November 17, 2020 04:54
Redux Archeology and Design Notes

Design Goals

reduxjs/redux#8 (comment)

The main goal of this library is to prove that Flux can be implemented in a way compatible with full hot reloading (and explore how this can be done). You can run the example code with npm start, change action creators or stores, and the new logic will kick in before you refresh.

@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active November 22, 2024 08:34 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@leonardofed
leonardofed / README.md
Last active December 26, 2024 19:46
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.


@btroncone
btroncone / ngrxintro.md
Last active November 5, 2024 12:20
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@DocX
DocX / README.md
Last active September 5, 2023 12:58
Connect to bash inside running ECS container by cluster and service name