Skip to content

Instantly share code, notes, and snippets.

View rrrhys's full-sized avatar

Rhys Williams rrrhys

View GitHub Profile
Route::get('/external_resource', function(\Illuminate\Http\Request $request){
$resource = $request->get("resource");
$options = array('http' => array('user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'));
$context = stream_context_create($options);
$f = file_get_contents($resource, false, $context);
$finfo = new finfo(FILEINFO_MIME);
@rrrhys
rrrhys / DebuggerCheck.ts
Created September 28, 2018 04:53
Check if the debugger is attached in a React Native project.
// setTimeout (and other wait related code) fails when a debugger is attached to React Native.
// in DebuggerCheck.ts
let _looksLikeDebuggerAttached = true;
setTimeout(() => {
_looksLikeDebuggerAttached = false;
}, 1);
export default {
debuggerIsAttached: () => {
@rrrhys
rrrhys / gist:d23d3fb59618ac3f2fd91dd641370f97
Last active July 22, 2021 01:59
Circuits - blind notes

Before start, we radio ground and request start and taxi for circuits. Have to request start in this case in case circuits are full. He will give clearance to start or start and taxi.

After start, we request clearance to taxi. Since we were on runway 24, we taxi'd to ECHO. We know where ECHO is because it runs L to R down the runway from 6.

Do the run-up etc, taxi to echo, stop, get clearance for circuits, enter runway.

Full throttle, no flaps, manage runway yaw with rudder until 60kt. Then slight back pressure to lift nose (in the 172N, the 172S just goes anyway)

Establish best rate, 74kt. Continue climb at best rate. (At 300ft, do some sanity checks - forgot acronym, trim for best rate)

@rrrhys
rrrhys / ember test
Last active November 20, 2022 12:00
<a href="https://app.emberfd.com/signin">Sign in</a>
<a href="http://api.emberfd.com/api/user/password-reset/bb6e15e67a0808586a7bdab40e43d0a9adb8feab5d4e49a23e66befb4a639d31?email=rhysw%2Bonboarding%40hey.com">api:Reset password</a>