- Create or find a gist that you own.
- Clone your gist (replace
<hash>with your gist's hash):# with ssh git clone git@gist.github.com:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
| <?php | |
| // force download of CSV | |
| // simulate file handle w/ php://output, direct to output (from http://www.php.net/manual/en/function.fputcsv.php#72428) | |
| // (could alternately write to memory handle & read from stream, this seems more direct) | |
| // headers from http://us3.php.net/manual/en/function.readfile.php | |
| header('Content-Description: File Transfer'); | |
| header('Content-Type: application/csv'); | |
| header("Content-Disposition: attachment; filename=FILENAME.csv"); | |
| header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
<hash> with your gist's hash):
# with ssh
git clone git@gist.github.com:<hash>.git mygist
# with httpsgit clone https://gist.github.com/.git mygist
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amendThis will open your $EDITOR and let you change the message. Continue with your usual git push origin master.
| { | |
| "printWidth": 100, | |
| "tabWidth": 2, | |
| "useTabs": false, | |
| "semi": true, | |
| "singleQuote": true, | |
| "trailingComma": "es5", | |
| "bracketSpacing": true, | |
| "jsxBracketSameLine": false, | |
| "arrowParens": "avoid", |
| @echo off | |
| set OPENSSL_CONF=%~dp0..\conf\openssl.cnf | |
| ..\bin\openssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 5475 -keyout rootCA.key -out rootCA.crt -subj "/CN=OSPanel/" | |
| ..\bin\openssl req -newkey rsa:2048 -nodes -days 5475 -keyout server.key -out server.csr -subj "/CN=PhpStorm/" | |
| ..\bin\openssl x509 -req -sha256 -days 5475 -in server.csr -extfile v3.txt -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out server.crt | |
| ..\bin\openssl dhparam -out dhparam.pem 2048 |
| <?php | |
| use Illuminate\Database\Seeder; | |
| use Symfony\Component\Console\Helper\ProgressBar; | |
| use Symfony\Component\Console\Output\ConsoleOutput; | |
| class UsersTableSeeder extends Seeder | |
| { | |
| /** | |
| * Amount. |
| # Set master image | |
| FROM php:7.3-fpm-alpine | |
| MAINTAINER Rajesh Chaudhary <rajeshisnepali@gmail.com> | |
| # Copy composer.lock and composer.json | |
| #COPY composer.lock composer.json /var/www/ | |
| # Set working directory | |
| WORKDIR /var/www |