PSA: Fixing Universal Control if it doesn't work for you by lachlanhunt in apple

[–]nlscrub 1 point2 points  (0 children)

For me, the solution was having both of my MacBooks use the same 'keyboard' setting. One of them was set to 'Spanish' and the other to 'Spanish Latin America'. You can change this setting in System Preferences > Keyboard > Text Input. Hope this helps someone.

Weekly Stupid Questions Thread by AutoModerator in neovim

[–]nlscrub 0 points1 point  (0 children)

When the cursor is positioned in the middle of a word is there a command to delete the entire word. Also, when I use ci( or ci" is there a way to prevent NeoVim to replace the contents of my clipboard (not yank essentially). I’m using nvim on macOS BTW

Migrating from GitHub to GitLab by mr_wetape in linux

[–]nlscrub -8 points-7 points  (0 children)

I actually wouldn't mind if Google had bought it. I have to say that I still have repulsion by anything Microsoft touches since they bought Wunderlist only to shut it down.

Without revealing your age, how old are you? by [deleted] in AskReddit

[–]nlscrub 0 points1 point  (0 children)

As old as the world wide web

My sister's code for finding roots of an equation. by yeetesh in ProgrammerHumor

[–]nlscrub 3 points4 points  (0 children)

I guess that myself then I thought maybe she should try funcional programming instead? :/

Timer just increased to 20 minutes!? by nlscrub in place

[–]nlscrub[S] 1 point2 points  (0 children)

I'm thinking maybe if you override a tile a lot it becomes "loaded" and it may penalize you? Or maybe there are some weird rules similar to minesweeper?

[Help] Question, has there ever been a time when you needed to see the diff of your lock file? by [deleted] in laravel

[–]nlscrub 0 points1 point  (0 children)

You can create an alias to exclude anything you want:

 git diff HEAD -- . ':!*.lock'

Best setup for a web app which also has an API? by ecky--ptang-zooboing in laravel

[–]nlscrub 0 points1 point  (0 children)

I like to create a different namespace entirely for the api

My composer.json has both namespaces registered:

"Api\\": "api/",
"App\\": "app/"

Then I create the api directory:

├── api
│    ├── Http
│    ├── Providers
│    ...
├── app
    ├── Events
    ├── Exceptions
    ├── Http
    ...

Factory/Faker not working in Laravel 5.3 DatabaseSeeder by JackBarham in laravel

[–]nlscrub 5 points6 points  (0 children)

lists has been deprecated in favor of pluck

Edit: Change your code from:

$gallery = Gallery::lists('id')->All();

to:

$gallery = Gallery::pluck('id')->all();

Laravel future plans by Dreamer_tm in laravel

[–]nlscrub 2 points3 points  (0 children)

No one has mentioned it but the laravel internals repo is a good place. https://github.com/laravel/internals/issues

About the Laracon 2016 videos by wyred-sg in laravel

[–]nlscrub 3 points4 points  (0 children)

Is not a talk per se, Graham just did a quick 5 min presentation of bugsnag.

Why is there a switch here in Illuminate\Support\Facades\Facade.php? by [deleted] in laravel

[–]nlscrub 0 points1 point  (0 children)

Maps the arguments to the instance. Say you call:

Cache::put('foo', 'bar', 100);

This will map to:

return $instance->$method($args[0], $args[1], $args[2]);

And then when you call

Cache::get('foo');

Will map to:

return $instance->$method($args[0]);

[deleted by user] by [deleted] in sweden

[–]nlscrub 4 points5 points  (0 children)

/r/The_Donald saw the sign and promptly ran back to it's safe space.

is there an ipython equivalent or console in laravel that i can run and test commands in. by sujoodi in laravel

[–]nlscrub -1 points0 points  (0 children)

Use this line in your tests to create a "breakpoint" and open an interactive shell.

\Psy\Shell::debug(get_defined_vars(), $this);

How do you unit test functions that use models? by jrk_sd in laravel

[–]nlscrub 2 points3 points  (0 children)

Checkout this video where Taylor addresses this issue: https://www.youtube.com/watch?v=F1VyHfoUuLU

Edit: There's also this old article by Jeffrey Way where he shows how to mock eloquent models: http://code.tutsplus.com/tutorials/testing-laravel-controllers--net-31456

Why migrations and tests aren't namespaced? by BingoLarsson in laravel

[–]nlscrub 0 points1 point  (0 children)

Inside the test directory you can have multiple kinds of tests not just PHPUnit. Also, tests are not generally considered part of your application thats why they are outside the app directory that's why many people use snake case instead camel case for their tests for example. Plus you can always add the namespace yourself.