Skip to content

Instantly share code, notes, and snippets.

View eli007s's full-sized avatar

Eli Orellana eli007s

  • 15:22 (UTC -07:00)
View GitHub Profile
@eli007s
eli007s / 0_reuse_code.js
Created July 18, 2016 22:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@eli007s
eli007s / nginx-unzip-module_good.patch
Created November 27, 2016 06:32 — forked from fffonion/nginx-unzip-module_good.patch
nginx-unzip-module, NODIR, NOCASE mod
diff --git a/ngx_http_unzip_module.c b/ngx_http_unzip_module.c
index 771e1dc..00ea0f1 100644
--- a/nginx-unzip-module/ngx_http_unzip_module.c
+++ b/nginx-unzip-module/ngx_http_unzip_module.c
@@ -224,7 +224,7 @@ static ngx_int_t ngx_http_unzip_handler(ngx_http_request_t *r)
zip_stat_init(&zip_st);
/* let's check what's the size of a file. return 404 if we can't stat file inside archive */
- if (0 != zip_stat(zip_source, unzipextract_path, 0, &zip_st)) {
+ if (0 != zip_stat(zip_source, unzipextract_path, ZIP_FL_NODIR|ZIP_FL_NOCASE, &zip_st)) {
@eli007s
eli007s / Client.swift
Created December 11, 2017 23:55 — forked from kean/Client.swift
import Foundation
import Alamofire
import RxSwift
import RxCocoa
protocol ClientProtocol {
func request<Response>(_ endpoint: Endpoint<Response>) -> Single<Response>
}
@eli007s
eli007s / kubectl.md
Created August 18, 2019 17:20 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@eli007s
eli007s / mac-setup-redis.md
Created March 19, 2020 11:28 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@eli007s
eli007s / pivot-tables.md
Created March 31, 2021 17:48 — forked from Braunson/pivot-tables.md
Laravel 8.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.