Skip to content

Instantly share code, notes, and snippets.

View tarator's full-sized avatar

Georg Abenthung tarator

View GitHub Profile
@johnnypea
johnnypea / useful-one-liners.sh
Last active April 22, 2024 14:56
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
anonymous
anonymous / MyWebAppInitializer.java
Created March 19, 2013 16:45
Implementation of WebApplicationInitializer (Spring WebMVC)
package com.ansiworks.lifepulse;
import javax.servlet.ServletContext;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;