View Article Factory Model - Laravel Model Factory with multiple relationship
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 Database\Factories; | |
use App\Models\Article; | |
use App\Models\User; | |
user App\Models\Category; | |
use Illuminate\Database\Eloquent\Factories\Factory; | |
class ArticleFactory extends Factory |
View Headphone Jack problem with Ubuntu
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
make sure you exit any running programs that are using your microphone. sudo alsa force-reload | |
open pavucontrol or any volume control tool of yours | |
change the option "Headphones (unplugged)" | |
you might have to restart your computer |
View sh
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
set -U fish_user_paths $HOME/.composer/vendor/bin |
View inputdata.json
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
[ | |
{ | |
"id": 0, | |
"title": "1", | |
"sublist": [ | |
{ | |
"id": 1, | |
"title": "1.1", | |
"sublist": [ | |
{ |
View main.ts
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
<Box | |
component="img" | |
sx={{ | |
height: 233, | |
width: 350, | |
maxHeight: { xs: 233, md: 167 }, | |
maxWidth: { xs: 350, md: 250 }, | |
}} | |
alt="The house from the offer." | |
src="https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&w=350&dpr=2" |
View brightnessDown.txt
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
#!/bin/bash | |
B=$(xrandr --verbose | awk '/Brightness/ { print $2; exit }') | |
A=0.2 | |
C=$(echo "$B - $A" | bc) | |
M=$(xrandr | grep " connected" | cut -f1 -d " ") | |
xrandr --output $M --brightness $C |
View redshift configuration for all day night mode
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
; Global settings for redshift | |
[redshift] | |
; Set the day and night screen temperatures | |
temp-day=3500 | |
temp-night=3500 | |
; Disable the smooth fade between temperatures when Redshift starts and stops. | |
; 0 will cause an immediate change between screen temperatures. | |
; 1 will gradually apply the new screen temperature over a couple of seconds. | |
fade=1 |