-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.
First install motion
:
~> sudo apt-get install motion
Then create a config file:
~> mkdir ~/.motion
~> nano ~/.motion/motion.conf
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
// For IE | |
.btn-inverse:active, | |
.btn-inverse.active { | |
background-color: #080808 \9; | |
} | |
// Add 'btn-flat' to your buttons | |
.btn-flat { | |
filter:progid:DXImageTransform.Microsoft.Gradient(enabled='false'); |
/* Solarized Dark | |
For use with Jekyll and Pygments | |
http://ethanschoonover.com/solarized | |
SOLARIZED HEX ROLE | |
--------- -------- ------------------------------------------ | |
base03 #002b36 background | |
base01 #586e75 comments / secondary content |
When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.
Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts
file on your host machine where we will keep a single set of DNS entires to our test web application(s).
// | |
// Responsive Margin & Padding Shortcuts for Twitter Bootstrap 3.0 | |
// --------------------------------------------------------------- | |
// This is an addition to Twitter Bootstrap that allows additional margin and padding shortcuts | |
// for enhanced layout control purposes. It should be included after the bootstrap.less | |
// import statement or precompiled as you see fit. It differs from bootstrap standards in | |
// that for any given screen size it predetermines the margin/padding size. All you have to | |
// do is specify the size you want xs,sm,md,lg, or xl. The exception is for items that you | |
// want to be centered using auto left/right margins. This can be device responsive by | |
// specifying mc-xs, mc-sm, mc-md, or mc-lg depending on when you want that behavior. |
IMPORTANT | |
Please duplicate this radar for a Safari fix! | |
This will clean up a 50-line workaround. | |
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072) | |
////////////////////////////////////////////////////////////////////////////// | |
(Now available as a standalone repo.) |