Skip to content

Instantly share code, notes, and snippets.

View mazlo's full-sized avatar

Matthäus Zloch mazlo

  • RTL Data
  • Cologne
View GitHub Profile
@JohnMeyerhoff
JohnMeyerhoff / addnewsshconnection.sh
Last active March 18, 2019 09:14
Creating a new ssh config for ssh connections to a server.
if [ $# -ne 2 ]; then
echo "this script works for ~/.ssh/ and uses the filename from \n
your first argument and the server from your second argument"
echo "example: $1 keyname_rsa username@serveraddress.net"
exit 1
fi
#not checking if second argument contains @.
echo "generating ssh-key with specified name:"
echo ~/.ssh/$1 | ssh-keygen
@jh3y
jh3y / getCursorXY.js
Last active February 26, 2023 23:44
get text cursor position
/**
* returns x, y coordinates for absolute positioning of a span within a given text input
* at a given selection point
* @param {object} input - the input element to obtain coordinates for
* @param {number} selectionPoint - the selection point for the input
*/
const getCursorXY = (input, selectionPoint) => {
const {
offsetLeft: inputX,
offsetTop: inputY,
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 8, 2024 14:30 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@openp2pdesign
openp2pdesign / graph-tool installation on Mavericks.md
Last active February 19, 2020 09:20
Install graph-tool on Mac OS Mavericks with python installed with brew
@Flet
Flet / gist:5447732
Created April 23, 2013 21:54
Sublime Text: Eclipse Shortcuts keymap
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@thbkrkr
thbkrkr / Default (Linux).sublime-keymap
Last active August 31, 2022 03:54
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },