Skip to content

Instantly share code, notes, and snippets.

View dovydasvenckus's full-sized avatar

Dovydas Venckus dovydasvenckus

View GitHub Profile
@dovydasvenckus
dovydasvenckus / 25-min-break.sh
Last active February 28, 2023 10:44 — forked from ReekenX/pomodoro.bash
Pomodoro Bash
#!/bin/sh
at now + 25 minutes -f break-over.sh
@dovydasvenckus
dovydasvenckus / deepGet.js
Last active January 28, 2016 11:43
Function that safely navigates javascript object. Original source http://adripofjavascript.com/blog/drips/making-deep-property-access-safe-in-javascript.html
//If not found returns undefined
function deepGet (obj, properties) {
// If we have reached an undefined/null property
// then stop executing and return undefined.
if (obj === undefined || obj === null) {
return;
}
// If the path array has no more elements, we've reached
// the intended property and return its value.
@dovydasvenckus
dovydasvenckus / grill
Created November 18, 2015 08:39
Kill grails process
#!/bin/bash
#Sometimes CTRL+C doesn't work on grails 3.0.X
#Found this script http://stackoverflow.com/questions/3585840/how-to-use-command-to-shutdown-grails-run-app
for P in $(ps aux | grep grails | grep java | awk '{print $2};'); do
kill -9 $P
done
exit 0