Skip to content

Instantly share code, notes, and snippets.

View itsrachelfish's full-sized avatar
🤠
Yeehaw

Rachel Fish itsrachelfish

🤠
Yeehaw
View GitHub Profile
@itsrachelfish
itsrachelfish / example.php
Created June 19, 2019 01:11
Get all admin users
$users = User::whereHas('roles', function ($query) {
$query->where('role_id', '=', 1);
})->get();
@itsrachelfish
itsrachelfish / hamster-wheel.log
Created June 13, 2019 18:19
Hamster Wheel Data (Apogaea 2019)
Sat Jun 08 2019 15:11:04 GMT-0600 (MDT) - Clockwise: 89
Sat Jun 08 2019 15:11:11 GMT-0600 (MDT) - Counter Clockwise: 89
Sat Jun 08 2019 15:11:14 GMT-0600 (MDT) - Counter Clockwise: 90
Sat Jun 08 2019 15:11:16 GMT-0600 (MDT) - Counter Clockwise: 91
Sat Jun 08 2019 15:11:19 GMT-0600 (MDT) - Counter Clockwise: 92
Sat Jun 08 2019 15:11:21 GMT-0600 (MDT) - Counter Clockwise: 93
Sat Jun 08 2019 15:12:04 GMT-0600 (MDT) - Counter Clockwise: 94
Sat Jun 08 2019 15:12:06 GMT-0600 (MDT) - Counter Clockwise: 95
Sat Jun 08 2019 15:12:09 GMT-0600 (MDT) - Counter Clockwise: 96
Sat Jun 08 2019 15:12:11 GMT-0600 (MDT) - Counter Clockwise: 97
php > echo str_pad(6, 2, 0, STR_PAD_LEFT);
06
php > echo str_pad(10, 2, 0, STR_PAD_LEFT);
10
php > echo str_pad(12, 2, 0, STR_PAD_LEFT);
12
@itsrachelfish
itsrachelfish / php.ini
Created March 25, 2019 02:00
PHP upload configuration
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

server.js

  • Initializes express.js
  • Initializes socket.io
  • Sets up API routes

media-player.js

  • Stores the playlist
  • Determines media types within playlist
  • Runs a timer to update clients with the current playback time of the video
@itsrachelfish
itsrachelfish / not a number is a number, lol
Last active February 27, 2019 07:35
teaching woodcat how to javascript
> var test = obj.a - obj.c;
undefined
> typeof test;
'number'
> isNaN(test);
true
@itsrachelfish
itsrachelfish / gist:6a597bbd2071629193ec3eb891ffcf69
Created January 20, 2019 20:49
Volunteer database nginx config
server {
listen 80;
server_name volunteer.apogaea.com voldb.apogaea.com voldb.apourl.co;
return 302 https://volunteer.apogaea.com$request_uri;
}
server {
listen 443 ssl;
server_name volunteer.apogaea.com;
@itsrachelfish
itsrachelfish / notes.md
Created November 16, 2018 22:58
Teeworlds startup script

Teeworlds server config

Directory structure

- server/
  - config/
    - enabled/
    - disabled/
  - binaries/
  - start.sh
@itsrachelfish
itsrachelfish / Generate columns.php
Created October 31, 2018 21:08
Art grants exportable updates
<?php
$columns = [];
$data = [];
foreach($exportableQuestions as $question)
{
$columns['question_' . $question->id] = $question->question;
}