Skip to content

Instantly share code, notes, and snippets.

View eli007s's full-sized avatar

Eli Orellana eli007s

  • 17:49 (UTC -07:00)
View GitHub Profile
@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.

@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 / 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

Keybase proof

I hereby claim:

  • I am eli007s on github.
  • I am eli007s (https://keybase.io/eli007s) on keybase.
  • I have a public key ASCH95tnMDW63FniXr8u1jOCx2v24G67_Y--HrMioHNgBAo

To claim this, I am signing this object:

@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 / 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)) {
MODEL max_connections innodb_buffer_pool_size
--------- --------------- -----------------------
t1.micro 34 326107136 ( 311M)
m1-small 125 1179648000 ( 1125M, 1.097G)
m1-large 623 5882511360 ( 5610M, 5.479G)
m1-xlarge 1263 11922309120 (11370M, 11.103G)
m2-xlarge 1441 13605273600 (12975M, 12.671G)
m2-2xlarge 2900 27367833600 (26100M, 25.488G)
m2-4xlarge 5816 54892953600 (52350M, 51.123G)
@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