Skip to content

Instantly share code, notes, and snippets.

View Lukas238's full-sized avatar
🏠
Working from home

Lucas Dasso Lukas238

🏠
Working from home
View GitHub Profile
@Lukas238
Lukas238 / show_links_status.user.js
Last active March 6, 2024 19:21
Show links status for United view in web browser email previews
@Lukas238
Lukas238 / .md
Last active November 16, 2021 15:19
Let's Encrypt Root Certs update - Sept 2021 exiparion fix

Root Cert update

Error message:

server certificate verification failed. CAfile: /etc/ssl/certs/cacertificates.crt CRLfile: none

Up-to-date system

Run this commands to update the root certificates of your system:

apt update
@Lukas238
Lukas238 / gist:d9b3a563c972e02e07eb923bd513b25d
Created October 31, 2021 17:44
Bulk format .json files with Prettier from CLI
# Run Prettier formater on all `.json`files on folder from the CLI
```
npx prettier --write "src/test/**/*.json"
```
@Lukas238
Lukas238 / do_backup.sh
Created September 2, 2021 15:12
Script to make a DataBase dump to file, without comments.
#!/bin/bash
# This script will dump the DB to file.
# Replace DB_USER, DB_PASS, and DB_NAME with your data base user, password and name.
# Mind the lack of gap apfter the `-p` argument. :)
# To run it use `sh do_backup.sh`
mysqldump -u DB_USER -pDB_PASS DB_NAME --skip-comments --host localhost > db_backup/db_backup.sql
@Lukas238
Lukas238 / gitbackup.php
Last active January 21, 2022 19:51 — forked from kiang/gist:9224e139320c230fedc5
Batch push files into git repo with size limitation in each commit
<?php
/**
* This script will list all modified/untracked/deleted git files, with their relative path,
* and add them to a commit group until the group pass 25mb in size, and then will push it.
*
* To run this script on the repository root folder by using this command `php gitbackup.php`.
*
* Requirements: PHP need to be able to run `exec`.
*/
@Lukas238
Lukas238 / Custom SSH key on Git ommand.md
Created September 1, 2021 22:09
Custom SSH key on Git command

Custom SSH key on Git command

The git (starting with git version 2.10) configuration core.sshCommand allow to pass arbitrary options to the SSH command, used on git pull, git fetch, and git push.

Using this configuration, we can pass a custom path to a ssh key, as well as a know_host file and or ssh .config file.

This is usefull in situations where you can run git commands from the shell, but do not have root access, like a exec() command executed from a PHP page.

[core]
@Lukas238
Lukas238 / better_trello_gui.user.js
Last active May 28, 2021 18:46
Basic GUI improvements for Trello boards
// ==UserScript==
// @name Basic GUI improvements for Trello boards
// @description This add basic GUI improvements for Trello boards, like display cards ID.
// @namespace https://c238.com.ar/
// @updateURL https://gist.github.com/Lukas238/bf95a626ceb97346034e48851456ccec/raw/better_trello_gui.user.js
// @downloadURL https://gist.github.com/Lukas238/bf95a626ceb97346034e48851456ccec/raw/better_trello_gui.user.js
// @version 0.2
// @author Lucas Dasso <dassolucas@c238.com.ar>
// @match http*://trello.com/b/*
// @icon https://www.google.com/s2/favicons?domain=trello.com
@Lukas238
Lukas238 / git_shallow_clone_readme.md
Last active May 18, 2021 19:53
Git shallow clone a repo to use as website root

How to git clone a repo to be used on a web server

Objective

I want to clone the repo of my site on my server, and configure the webserver to point to the subfolder ./public/, inside the repo.

This will allow me, for example, to update the site from the repo by means of running the commant git pull --forceon the server.

Repository structure

@Lukas238
Lukas238 / Readme.md
Last active May 19, 2021 03:17
Toggl2jira Toggl.com companion

Toggl2jira Toggl.com companion

This script will remove the custom reserved tag "_logged" from any "continued" or "duplicated" time entry.

Use case

I usualy track my worked time in Toggl, but then report this info on Jira platform, as this is required by my job.

I keep track of already reported time entries by manualy adding them the tag "_logged". But some times I need to continue a task, but i dont want to bring the "_logged" tag to this new time entry.

@Lukas238
Lukas238 / Email On Acid_supported_devices_generator.md
Last active September 2, 2020 18:05
Email On Acid: Supported devices list generator

Email On Acid: Supported devices list generator

Navigate to the Email Test Settings page on Email On Acid, select a profile, and run this snipped on the browser developers console. The generated list will be a tab separated list, ready to be pasted on Excel.

var eoa_list = "";
$('#fieldset_all > fieldset').each((key,type)=>{
  $(type).find('> fieldset').each((key,device)=>{
		$(device).find('> label[aria-checked="true"]').each((key,os)=>{