Skip to content

Instantly share code, notes, and snippets.

View bialikover's full-sized avatar

Adán G. Galván González bialikover

View GitHub Profile
@bialikover
bialikover / devToolsSnippets.js
Created January 27, 2020 18:24
Export/Import chrome devtools snippets
// Open devtools undocked, then inspect that devtools again
// Run in the secondary console
let exportSnippets;
InspectorFrontendHost.getPreferences(_ => { exportSnippets = JSON.parse(_.scriptSnippets); });
// now you can: copy(exportSnippets);
// import back in
let importSnippets = [ /* paste snippets */ ];
InspectorFrontendHost.setPreference("scriptSnippets", JSON.stringify(importSnippets));
@bialikover
bialikover / gist:ebeacaef8bbe8013dc89
Created February 24, 2016 21:08 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote