Skip to content

Instantly share code, notes, and snippets.

Avatar
🍁
playing with something, probably

Daniel Estévez danielestevez

🍁
playing with something, probably
View GitHub Profile
@danielestevez
danielestevez / regex.md
Last active Jun 14, 2021
Regular expressions for many things
View regex.md

Use https://regexr.com/

  • Extract IP/Domain from a URL (group[2])
^(http|https)://([^/]*)/?
  • Parse IP
View docker-commands.md
  • Kill all containers for a given <image-name>
  docker rm $(docker stop $(docker ps -a -q --filter ancestor=<image-name> --format="{{.ID}}"))
  • Login to a docker container
  docker exec -it container_id /bin/bash
@danielestevez
danielestevez / linux_commands.md
Last active Jul 14, 2020
Linux cool commands
View linux_commands.md
  • Kills all process by name

sudo kill -9 $(pidof middleman)

View JIRA tips
* Access JIRA with no SSO, just user/password
https://[JIRA_URL]/jira/secure/Dashboard.jspa?os_username=[USER_NAME]&os_password=[USER_PASSWORD]
@danielestevez
danielestevez / formatsqloutput.sql
Last active Apr 26, 2019
Format SQL too many fields
View formatsqloutput.sql
pager less -SFX
select * from table;
@danielestevez
danielestevez / keybase.md
Created Jul 23, 2018
keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am danielestevez on github.
  • I am destevez (https://keybase.io/destevez) on keybase.
  • I have a public key whose fingerprint is D643 2F6B 354B B8A3 5A62 9875 4A38 23E7 0D46 E466

To claim this, I am signing this object:

View .gitconfig
#[user]
# signingkey = xxxxx
# email = contact@danielestevez.com
# name = Dani Estevez
[user]
name = daniel.estevez
View bash_aliases
alias mvi='mvn clean install -Dtest.suite=none -Dit.suite=none -fae -T1C'
alias mvall='mvn clean install -Dtest.suite=all -Dit.suite=all -fae -T1C'
alias mvallf='mvan clean install -Dtest.suite=all -Dit.suite=all -ff -T1C'
alias mvndep='mvn cargo:deployer-redeploy'
alias psg='ps -ef | grep $1'
alias sk='sudo kill -9 $1'
alias sshi='ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
@danielestevez
danielestevez / debugsql.sql
Last active Feb 22, 2018
Utils for debugging triggers and procedures in SQL
View debugsql.sql
DROP TABLE IF EXISTS `kinton`.`debug_msg`;
CREATE TABLE `debug_msg` (
`msg` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
INSERT INTO debug_msg (msg) VALUES (CONCAT('message: ',IFNULL(variable, 'NULL')));