Skip to content

Instantly share code, notes, and snippets.

Avatar
📗
"Stay hungry. Stay foolish"

Salvador Briones Mexidense

📗
"Stay hungry. Stay foolish"
View GitHub Profile
@Mexidense
Mexidense / disable-animations.sh
Created Jan 27, 2021
optimize GUI Gnome on Ubuntu 20.04
View disable-animations.sh
#!/bin/sh
gsettings set org.gnome.desktop.search-providers disable-external 'true'
gsettings set org.gnome.desktop.interface enable-animations 'false'
@Mexidense
Mexidense / swap-resizer.sh
Created Jan 23, 2021
Resize Swap volume on Ubuntu 20.04 to 8GB
View swap-resizer.sh
#!/bin/sh
# Firstly, if you want to check the swap memory size run: swapon -s
# Resize Swap volume to 8GB
sudo swapoff -a && sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 && sudo mkswap /swapfile && sudo swapon /swapfile
View Dynamic replace in subl
FIND:
(data-target="modal-[^"]*")((.|\r|\n)*)(data-target="modal-[^"]*")
REPLACE:
$1$2$1
View gist:9c4df256f19c6a1c528f139a00ecf33d
Shitf + ? Help
1) Hover + (space) will assign/unassign you to the card.
2) Hover + (m) will allows you to add a member in the card.
3) Hover + (l) will allows you to add a label in the card.
4) Hover + (d) will allows you to set a date in the card.
5) Hover + (c) will allows you to archive a card.
6) Hover + (s) will allows you to watch a card.
7) (q) will show you only your work.
@Mexidense
Mexidense / laravel-permissions.sh
Created Jul 15, 2019
Laravel file permissions
View laravel-permissions.sh
#from root user
chown -R $USER:www-data storage
chown -R $USER:www-data bootstrap/cache
chmod -R 775 storage
chmod -R 775 bootstrap/cache
View Semantic Commit Messages with Emoji template
⭐️ feat: add beta sequence (new feature)
🛠 fix: remove broken confirmation message (bug fix)
♻️ refactor: share logic between 4d3d3d3 and flarhgunnstow (refactoring production code)
🌈 style: convert tabs to spaces (formatting, missing semi colons, etc; no code change)
🔍 test: ensure Tayne retains clothing (adding missing tests, refactoring tests; no production code change)
😒 chore: add Oyster build script (updating grunt tasks etc; no production code change)
📝 docs: explain hat wobble (changes to documentation)
Sources:
https://seesparkbox.com/foundry/semantic_commit_messages
@Mexidense
Mexidense / services.yml
Created Jun 6, 2019
File for active devel and kint debuger in D8
View services.yml
parameters:
session.storage.options:
# Default ini options for sessions.
#
# Some distributions of Linux (most notably Debian) ship their PHP
# installations with garbage collection (gc) disabled. Since Drupal depends
# on PHP's garbage collection for clearing sessions, ensure that garbage
# collection occurs by using the most common settings.
# @default 1
gc_probability: 1
View Markets view
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 offset-md-2">
<div class="card">
<div class="card-header">Markets</div>
<div class="card-body">
@foreach ($markets as $item)
{{$item}}
@endforeach
@Mexidense
Mexidense / launch.json
Created Dec 16, 2018
Configuration for xDebug on VSCode and Laravel 5.7
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"ignore": [
"**/vendor/**/*.php"
View Limit backup of db table
mysqldump -u <USER> -p<PASSWORD> --opt --where="1 limit <FROM REGISTRY>,<TO REGISTRY>"
--default-character-set=utf8 <DB_NAME> <TABLE_NAME> > <FILE_NAME>.sql