Skip to content

Instantly share code, notes, and snippets.

View lcuevastodoit's full-sized avatar
✔️
Verified

LUIS CUEVAS lcuevastodoit

✔️
Verified
  • Bogota DC, Colombia
View GitHub Profile
@lcuevastodoit
lcuevastodoit / Ubuntu Budgie enhance Colors.sh
Created October 31, 2022 22:54
Ubuntu Budgie enhance Colors
sudo apt install sct
sct 6200
flatpak install flathub io.github.libvibrant.vibrantLinux
# Open Vibrant Linux GUI and set the color in 200 or more
@lcuevastodoit
lcuevastodoit / refactoring_techniques.md
Created October 31, 2022 20:28
Refactoring Techniques

Composing Methods

  1. Extract Variable
  2. Split Temporary Variable
  3. Remove Assigments to Parameters
  4. Extract Method
  5. Replace Temp with Method Quey
  6. Replace Method with a Method Object (a Class)
  7. Substitute Algorithm
def logDirectory = "${thb.settings.thbHome}/logs"
log4j = {
appenders {
file name: "file", threshold: Level.ERROR, file: "${logDirectory}/${appName}-error.log".toString()
file name: "infoFile", threshold: Level.INFO, file: "${logDirectory}/${appName}-info.log".toString()
console name: "stdout", threshold: Level.DEBUG
}
root {
error 'file'
log.debug('Esto es un mensaje de depuración')
log.info('Esto es un mensaje de información')
log.error('Esto es un mensaje de error')
@lcuevastodoit
lcuevastodoit / grails-logging.md
Created October 19, 2022 22:44 — forked from dellermann/grails-logging.md
Shows how to enable logging for Grails database connections.

Full stack traces

To enable full stack traces just add the command line argument -Dgrails.full.stacktrace=true when calling grails, e. g.:

grails -Dgrails.full.stacktrace=true run-app

SQL logging

@lcuevastodoit
lcuevastodoit / DebugFilters.groovy
Created October 19, 2022 21:44 — forked from eliotsykes/DebugFilters.groovy
Grails Debug Filter - log requests
// Put me in grails-app/conf/DebugFilters.groovy
class DebugFilters {
def filters = {
all(controller:'*', action:'*') {
before = {
log.error "${request.method}: $request.forwardURI $request.params"
}
after = { Map model ->
@lcuevastodoit
lcuevastodoit / a_vscode_ror_debugger_setup_with_webpack_dev_server_autolaunch.md
Created September 28, 2022 23:49
Setup Visual Studio Code Ruby on Rails debugger with webpack-dev-server autolaunch

Visual Studio Code Ruby on Rails debugger with webpack-dev-server autolaunch

  1. Both files needs to be specified for every workspace
  2. Install gem ruby-debug-ide gem install ruby-debug-ide
  3. If using rvm make sure to have correctly setup paths or open workspace from terminal with code .
  4. With rbenv everything should work out of the box
  5. You can now run rails server with pressing button (or ctrl+shift+d) and webpack-dev-server will start automatically on background.

Notes: Please note, when you stop debug server, webpack-dev-server remain running in terminal (because it's background job).

@lcuevastodoit
lcuevastodoit / ruby.json
Last active September 26, 2022 00:50
Configure User Snippets: Ruby Design Patterns Snippets for VSCode
{
// Place your snippets for ruby here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@lcuevastodoit
lcuevastodoit / header.css
Last active November 19, 2022 15:31
Wekan Custom Style.css
/* append to /build/programs/web.browser/app/client/components/main/header.css */
/*Custom Style LC*/
#content {
background-image: url("https://i.imgur.com/si64lKd.jpeg");
background-size: cover;
}
div.board-color-midnight {
background-image: url("https://i.imgur.com/si64lKd.jpeg");
background-size: cover;
@lcuevastodoit
lcuevastodoit / datatables.js
Created June 12, 2022 02:45 — forked from bodrick/datatables.js
esbuild and datatables.net
import $ from 'jquery'
window.jQuery = window.$ = $
import JSZip from 'jszip'
window.JSZip = JSZip
import 'pdfmake'
import dataTable from 'datatables.net-bs4'
dataTable(window, $)
import buttons from 'datatables.net-buttons-bs4'
buttons(window, $)
import columnVisibility from 'datatables.net-buttons/js/buttons.colVis.js'