sudo install fail2ban
sudo install ufw
sudu ufw default deny incomoing
sudo ufw default allow outgoins
<template> | |
<div> | |
<div v-for="(item, i) in items" :key="i" v-intersect="onIntersect" :data-last="i === items.length - 1"> | |
<slot :item="item"></slot> | |
</div> | |
</div> | |
</template> | |
<script lang="ts"> | |
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'; |
/* CHAT STYLES */ | |
* { | |
font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, | |
Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, | |
Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; | |
letter-spacing: 0.5px; | |
} | |
.ce-chat-list { | |
background-color: rgb(240, 240, 240) !important; |
const xlsx = require('xlsx'); | |
const path = require('path'); | |
const exportExcel = (data, workSheetColumnNames, workSheetName, filePath) => { | |
const workBook = xlsx.utils.book_new(); | |
const workSheetData = [ | |
workSheetColumnNames, | |
... data | |
]; | |
const workSheet = xlsx.utils.aoa_to_sheet(workSheetData); |
#!/bin/bash | |
sudo apt-get install -y devilspie | |
mkdir -p ~/.devilspie | |
echo ' | |
(if (contains (window_class) "Code") | |
(begin | |
(spawn_async (str "xprop -id " (window_xid) " -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 ")) | |
(spawn_async (str "xprop -id " (window_xid) " -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xD8000000")) |
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restaurar | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
<?php | |
use Symfony\Component\Console\Helper\ProgressBar; | |
use Symfony\Component\Console\Output\ConsoleOutput; | |
class DoSomething extends Migration | |
{ | |
public function up() | |
{ | |
$output = new ConsoleOutput(); |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
## Introduction | |
This post aims to provide a simple example of how to use traits with Laravel Query Scopes. The trait will sort columns based on "sort" and "direction" being found within the request, while protecting the database of unwanted sorting by adding a "sortables" property to the model. The end result looks like this with a Post model as an example: | |
``` | |
Post::sort(request()) | |
``` | |
### Sortable trait |