Skip to content

Instantly share code, notes, and snippets.

<?php
class CustomerAffiliationController extends BaseController
{
public function index($customer_id)
{
$affiliations = Affiliation::with("AffiliationCategory", "Organism")->where("customer_id","=", $customer_id)->get();
return $affiliations;
}
@Dragory
Dragory / 0_reuse_code.js
Last active August 29, 2015 14:06
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
@Dragory
Dragory / index.js
Last active October 31, 2017 14:19 — forked from anonymous/index.js
'use strict'
const fs = require('fs')
const cheerio = require('cheerio')
const request = require('request')
var Parent = this
Parent.Anime = function Anime (url) {
return new Promise((resolve, reject) => {
request(url, (err, res, body) => { // Send HTTP request to ask for
if (err) { reject(err); return } // Error handling
let $ = cheerio.load(body)
@Dragory
Dragory / openssl.md
Created February 16, 2021 12:32 — forked from Nathaniel100/openssl.md
Generate PKCS10 request

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

Generate a certificate signing request (CSR) for an existing private key

openssl req -out CSR.csr -key privateKey.key -new