Network Working Group
Request for Comments: XXXX
Category: Standards Track
| Metadata | Details |
|---|
| #!/bin/sh | |
| git filter-branch -f --env-filter ' | |
| an="$GIT_AUTHOR_NAME" | |
| am="$GIT_AUTHOR_EMAIL" | |
| cn="$GIT_COMMITTER_NAME" | |
| cm="$GIT_COMMITTER_EMAIL" | |
| if [ "$GIT_COMMITTER_EMAIL" = "user@wrongemail.com" ] |
| import requests, json | |
| from subarucreds import username,password,pin # just a "subarucreds.py" that has some variables i didn't want to share | |
| import datetime | |
| #login | |
| s=requests.Session() | |
| loginr=s.post('https://www.mysubaru.com/login', data = {'username':username,'password':password}) | |
| #should return a response 200 | |
| #Where's my subaru? |
| <?php | |
| /** | |
| * @param null $user | |
| * @return bool | |
| */ | |
| public function isAuthorized($user = null) | |
| { | |
| // Admin can access every action | |
| if ($user && isset($user['is_admin']) && $user['is_admin']) { | |
| $this->Auth->allow(); |
| <?php | |
| namespace App\Controller\Api; | |
| use Cake\Controller\Controller; | |
| class ApiAppController extends Controller | |
| { | |
| use \Crud\Controller\ControllerTrait; |
| <?php | |
| namespace App\Controller\Api; | |
| /** | |
| * Releases Controller | |
| * | |
| * @property \App\Model\Table\ReleasesTable $Releases | |
| */ | |
| class ReleasesController extends ApiAppController | |
| { |
| /** | |
| * @param $bool | |
| * @return string | |
| */ | |
| function yn($bool) | |
| { | |
| return ($bool)?'Yes':'No'; | |
| } |
| $this->addBehavior('Josegonzalez/Upload.Upload', [ | |
| // You can configure as many upload fields as possible, | |
| // where the pattern is `field` => `config` | |
| // | |
| // Keep in mind that while this plugin does not have any limits in terms of | |
| // number of files uploaded per request, you should keep this down in order | |
| // to decrease the ability of your users to block other requests. | |
| 'photo' => [ | |
| 'fields' => [ | |
| // if these fields or their defaults exist |