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
### Keybase proof | |
I hereby claim: | |
* I am FrenkyNet on github. | |
* I am frenkynet (https://keybase.io/frenkynet) on keybase. | |
* I have a public key whose fingerprint is 3ED4 AF00 97B3 C922 5340 D2F6 5276 297F FD01 F1D8 | |
To claim this, I am signing this object: |
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
--- | |
suites: | |
some_suite: | |
namespace: Name\Space | |
psr4_prefix: Name\Space |
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
var gulp = require('gulp'); | |
var spawn = require('child_process').spawn; | |
var subprocess; | |
function refreshGulpfile() { | |
if (subprocess) subprocess.kill(); | |
subprocess = spawn('gulp', ['watched-default'], {stdio: 'inherit'}); | |
} | |
gulp.task('default', function () { |
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 | |
$stream = $fs->readStream($file); | |
// send the right headers | |
header("Content-Type: " . $fs->getMimetype($file)); | |
header("Content-Length: " . $fs->getSize($file)); | |
header("Content-disposition: attachment; filename=\"" . basename($file) . "\""); | |
// dump the attachement and stop the script |
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 | |
use GuzzleHttp\Post\PostFile; | |
$request = $client->createRequest('POST', 'http://example.com/'); | |
$postBody = $request->getBody(); | |
$readStream = $flysystem->readStream($fileLocation); | |
$postBody->addFile(new PostFile('test', $readStream); | |
$response = $client->send($request); |
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
{ | |
"autoload": { | |
"psr-4": { | |
"Vendor\\Package\\": "src/Vendor/Package" | |
} | |
} | |
} |
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
var gulp = require('gulp'), | |
browserify = require('gulp-browserify'), | |
uglify = require('gulp-uglify'), | |
rename = require('gulp-rename'), | |
sass = require('gulp-sass'), | |
jshint = require('gulp-jshint'); | |
gulp.task('javascript', function () { | |
return gulp.src('assets/js/*.js') | |
.pipe(browserify({ |
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 | |
use League\Flysystem\Filesystem; | |
use League\Flysystem\Adapter\Dropbox; | |
use League\Flysystem\Adapter\Local; | |
$dropbox = new Filesystem(new Dropbox($client, 'dropbox/root/dir')); | |
$local = new Filesystem(new Local('loca/root/path')); | |
$dropbox->write('destination.ext', $local->read('relative/path/to/file.ext')); |
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 | |
function append_to_file($location, $contents) | |
{ | |
$handle = fopen($location, 'a'); | |
defer fclose($handle); | |
// stuff stuff | |
frwite($handle, $contents); | |
} |
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 | |
class DomainListener | |
{ | |
public function handle(EventInterface $event) | |
{ | |
// PASS | |
} | |
public function handle(DomainEvent $event) |
OlderNewer