Skip to content

Instantly share code, notes, and snippets.

View ddneat's full-sized avatar
👋
hello

David Neubauer ddneat

👋
hello
View GitHub Profile
@ddneat
ddneat / brew-gshuf
Last active October 9, 2020 09:01
listen to random music with afplay
brew install gshuf
@ddneat
ddneat / style.css
Created January 3, 2014 05:18
loading background images with a fadein effect by using jquery
// style.css
#bg-loading-parent{
position: relative;
width: 100%;
height: 100%;
}
.bg-loading-container{
display: none;
@ddneat
ddneat / style.css
Last active May 18, 2017 11:01
responsive 16:9 ratio with plain css
// 16:9 aspect ratio (9/16 = 56.25%), use 75% for 4:3
// you can also add padding-top to add some extra space
.image-wrapper {
background-color: #000;
width: 100%;
padding-bottom: 56.25%;
position: relative;
}
.image-wrapper img {
@ddneat
ddneat / .htaccess
Created April 15, 2014 19:15
.htaccess force download
AddType application/octet-stream .csv
AddType application/octet-stream .xls
AddType application/octet-stream .doc
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .mov
AddType application/octet-stream .pdf
@ddneat
ddneat / bash_profile
Last active August 29, 2015 13:59
fixing locals on ubunut
# add this export to your bash_profile
export LC_ALL="en_US.utf8"
@ddneat
ddneat / installing rails on ubuntu bash commands
Last active August 29, 2015 13:59
Installing Ruby on Rails on Ubuntu with RVM
sudo apt-get update
sudo apt-get install curl
\curl -L https://get.rvm.io | bash -s stable
# restart bash
rvm requirements
rvm install ruby
rvm rubygems current
gem install rails
@ddneat
ddneat / ufw bash commands
Last active August 29, 2015 13:59
ubuntu ufw firewall
# Current ufw status and list of rules
ufw status
# Starts ufw daemon
ufw enable
# Add new rule (allow incoming HTTP connections -> port 80)
ufw allow http
# Remove an existing rule
@ddneat
ddneat / ubuntu user managment
Last active August 29, 2015 13:59
ubuntu user managment
# https://help.ubuntu.com/10.04/serverguide/user-management.html
# adding a user without assistant
sudo useradd <username>
# adding a user WITH assistant
sudo adduser <username>
# deleting a user
sudo userdel <username>
@ddneat
ddneat / uninstall apache2
Created April 16, 2014 16:09
uninstall apache2
sudo aptitude remove --purge $(dpkg -l apache* | grep ii | awk '{print $2}')
rsync -zrp /local-path user@domain:/remote-path --progress