Skip to content

Instantly share code, notes, and snippets.

View branquito's full-sized avatar
🌴
On vacation

Branchito de Munze branquito

🌴
On vacation
View GitHub Profile
@branquito
branquito / file-folder-rename-bash-recursive.txt
Created March 1, 2013 00:19
batch rename files or folders recursively in bash
command to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern
find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done
example:
find . -type f -maxdepth 1 -name "domain*.php" | while read FNAME; do mv "$FNAME" "${FNAME//domain/lead}"; done
before: after:
@branquito
branquito / HelloWorld.vue
Created February 11, 2022 11:48 — forked from mrichman/HelloWorld.vue
Cognito Hosted UI + Vue.js example
<template>
<div>
<b-container>
<b-row align-h="center">
<div v-if="!signedIn">
<b-button variant="success" @click="signIn">Sign in with Cognito</b-button>
</div>
<div v-if="signedIn">
<h4>Welcome, {{ username }}!</h4>
<b-button variant="danger" @click="signOut">Sign out</b-button>
@branquito
branquito / SH_MYSQL_backup-all-dbs.sh
Created December 7, 2012 00:17
shell script to backup all db's [MYSQL]
#!/bin/bash
# Shell script to backup MySql database
# To backup Nysql databases file to /backup dir and later pick up by your
# script. You can skip few databases from backup too.
# For more info please see (Installation info):
# http://www.cyberciti.biz/nixcraft/vivek/blogger/2005/01/mysql-backup-script.html
# Last updated: Aug - 2005
# --------------------------------------------------------------------
# This is a free shell script under GNU GPL version 2.0 or above
# Copyright (C) 2004, 2005 nixCraft project
@branquito
branquito / Terminal.sublime-settings
Created April 25, 2013 16:48
open git bash using `terminal` plugin for sublime
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "C:\\Windows\\System32\\cmd.exe",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["/c sh --login -i"]
<template>
<div>
<div
v-if="loadedFilters && Object.keys(loadedFilters).length > 0 && filtersType"
class="active-filters">
<h4 class="applied-filters-text">{{ $tc('filters.applied_filters') }}:</h4>
<div
v-for="(loadedFilter, key) in loadedFilters"
:key="key"
class="filter-btn-group btn-group mr-2"
@branquito
branquito / pet-snippet.toml
Created December 6, 2018 16:40
description
[[snippets]]
description = "ping"
command = "ping 8.8.8.8"
tag = ["network", "google"]
output = ""
[[snippets]]
description = "Connect to mysql via mycli"
command = "mycli mysql://root@localhost:3306/ -p root"
tag = ["mycli", "mysql", "tool"]
@branquito
branquito / VCellDetails.vue
Created September 25, 2018 15:07
error during evaluation
orderedStatuses() {
return this.statuses.all.reduce((status, acc) => {
acc.push("...")
return acc
}, [])
},
@branquito
branquito / files
Created September 25, 2018 10:49
nav filenames
agency-structure-active.svg
biling-finance-active.svg
candidates-active.svg
clients-locations-active.svg
dashboard-active.svg
documents-compliance-active.svg
files
internal-users-active.svg
job-schedule-active.svg
rate-edit.svg
@branquito
branquito / index.js
Created September 23, 2018 10:43
example routes
import Navigo from "navigo"
const router = new Navigo(null, true, "#!")
import Page1 from "./pages/page-one"
import Page2 from "./pages/page-two"
router
.on("/mixins", function() {
Page1.run()
})
@branquito
branquito / foo.sh
Last active May 27, 2018 12:08
http prompt example, combined with `jq` to show only fields of type string
get sub-agencies | jq '[.data[] | paths(strings) | add] | unique[]'