- In a terminal, install gdown with
pip install gdown
- Upload the file you want to send to the server to Google drive
- Copy the "anyone with link" share link for the file
- Paste it into notepad and copy the file ID from the link
- cd to the directory you want the file to go (or use the
-O <path>
option with gdown) - Download the file with
~/.local/bin/gdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<phpunit bootstrap="vendor/autoload.php" | |
colors="true" | |
stopOnFailure="false" | |
testdox="true"> | |
<testsuites> | |
<testsuite name="change-this-to-what-you-are-testing"> | |
<directory suffix="Tests.php">tests</directory> | |
</testsuite> | |
</testsuites> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require-dev": { | |
"phpunit/phpunit": "^9" | |
}, | |
"autoload": { | |
"psr-4": { | |
"Bowling\\": "src" | |
} | |
}, | |
"autoload-dev": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Requirement: create a class which calculates the score for a complete game of 10 Pin Bowling | |
The class should have two functions, roll() and score(). | |
roll should be given the number of pins knocked down on that roll: roll(int $pins) | |
score takes no parameters and simply returns the score for the game: score(): int | |
Games are made up of 10 frames. Each player gets 2 rolls of the ball per frame | |
to try to knock down as many pins as possible. The score for each roll is the | |
number of pins knocked down in that roll. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lg = lg1 | |
lg1 = lg1-specific --all | |
lg2 = lg2-specific --all | |
lg3 = lg3-specific --all | |
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' | |
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHP and Laravel stuff | |
/node_modules | |
public/hot | |
public/storage | |
public/build | |
public/css/filament | |
public/js/filament | |
/public/public | |
/storage/*.key | |
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands\Log; | |
use Illuminate\Console\Command; | |
class ClearLogFile extends Command | |
{ | |
protected $signature = 'log:clear'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2009 rupa deadwyler. Licensed under the WTFPL license, Version 2 | |
# maintains a jump-list of the directories you actually use | |
# | |
# INSTALL: | |
# * put something like this in your .bashrc/.zshrc: | |
# . /path/to/z.sh | |
# * cd around for a while to build up the db | |
# * PROFIT!! | |
# * optionally: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host github.com | |
Hostname github.com | |
IdentityFile=~/.ssh/id_rsa_GitHub | |
Doing a simple CONST declaration in config files can cause errors when enabling caching in Laravel. The config file appears to be loaded more than once and the second time causes an error because the constant is already defined.
The safe way to do it is to use the old syntax and only try to define the constant if it has not already been defined, as the following example shows:
<?php
use Illuminate\Support\Facades\Facade;
OlderNewer