# perform a dry run first
for i in *; do echo mv "$i" "`echo $i | sed -e 's,_,-,g'`"; done
# actually run the command
for i in *; do mv "$i" "`echo $i | sed -e 's,_,-,g'`"; done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/chowald/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Uncomment the following line to use case-sensitive completion. |
tar cf file.tar files
- create a tar named file.tar containing filestar xf file.tar
- extract the files from file.tartar czf file.tar.gz files
- create a tar with Gzip compressiontar xzf file.tar.gz
- extract a tar using Gzipgzip file
- compresses file and renames it to file.gzgzip -d file.gz
- decompresses file.gz back to file
// https://visjs.github.io/vis-network/examples/network/other/configuration.html
// run this in the console
let nodesRaw = document.querySelectorAll('.vis-config-item');
let nodesArray = Array.from(nodesRaw);
let physics = nodesArray.slice(0, nodesArray.length - 16);
physics.forEach(item => {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
The steps below assume that:
- you use command-line for git and are using MacOS
- you are working on a feature branch
vim
is the default editor.
Notes
- While in interactive rebase mode, the commits are in the opposite order of the way
git log
shows them. - When you see a command like
SHIFT + :
, the plus sign should not be pressed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
OlderNewer