Of Love & Regret is set to open in Canton on Wednesday - Baltimore Sun
17 hours ago
The best part of @ofLoveandRegret won't be apparent until you visit. Hint: I'm excited to see them again soon.
from twitter
17 hours ago
Coming soon, to my @untappd tab. The Heady Topper isn’t all m... on Twitpic
yesterday
Coming soon, to my @untappd tab. The Heady Topper isn’t all mine.
from twitter
yesterday
Web hosting, domain name registration and web services by 1&1 Internet
2 days ago
@dkonigs @BlackBerryDev I own if you want to use it :)
from twitter
2 days ago
WordPress › Support » Resizing images for a responsive design
3 days ago
/* Images */
.entry-content img,
.comment-content img,
.widget img {
max-width: 97.5%; /* Fluid images for posts, comments, and widgets */
}
img[class*="align"],
img[class*="wp-image-"] {
height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */
}
img.size-full {
max-width: 97.5%;
width: auto; /* Prevent stretching of full-size images with height and width attributes in IE8 */
}
wordpress
responsivedesign
image
scaling
.entry-content img,
.comment-content img,
.widget img {
max-width: 97.5%; /* Fluid images for posts, comments, and widgets */
}
img[class*="align"],
img[class*="wp-image-"] {
height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */
}
img.size-full {
max-width: 97.5%;
width: auto; /* Prevent stretching of full-size images with height and width attributes in IE8 */
}
3 days ago
Google continues to innovate and dominate in the advertising ... on Twitpic
5 days ago
Google continues to innovate and dominate in the advertising arena.
from twitter
5 days ago
WordPress › Support » WXR File Splitter
6 days ago
#!/usr/bin/python
# This script is designed to take a wordpress xml export file and split it into some
# number of chunks (2 by default). The number of lines per chunk is determined by counting
# the number of occurences of a particular line, '<item>n' by default, and breaking up the
# such that each chunk has an equal number occurences of that line. The appropriate header
# and footer is added to each chunk.
import os
import sys
import math
if len(sys.argv) < 2 :
print 'Please specify the name of wordpress export file you would like to split'
sys.exit(0)
try :
input_file = open(sys.argv[1], 'r')
lines = input_file.readlines()
(input_file_path, input_file_string) = os.path.split(sys.argv[1])
(input_file_name, input_file_extension) = os.path.splitext(input_file_string)
except IOError :
print 'Could not open file "%s".' % sys.argv[1]
sys.exit(0)
number_of_chunks = max(int(sys.argv[2]), 2) if len(sys.argv) > 2 else 2
line_delimiter = '<item>n'
delimiter_count = 0
for line in lines :
if line == line_delimiter :
delimiter_count += 1
print ''
print 'File "%s" contains %s items' % (input_file_string, delimiter_count)
delimiter_count = 1.0*delimiter_count
delimiters_per_chunk = int(math.ceil(delimiter_count/number_of_chunks))
print 'Creating %s files with at most %s items each:' % (number_of_chunks, delimiters_per_chunk)
header = ""
footer = "n</channel>n</rss>n"
chunk_number = 1
output_file_name = "%s_%s%s" % (input_file_name, chunk_number, input_file_extension)
output_file = open(output_file_name, 'w')
print ' Writing chunk %s to file %s...' % (chunk_number, output_file_name)
delimiter_count = 0
for line in lines :
if line == line_delimiter : delimiter_count += 1
if chunk_number is 1 and delimiter_count is 0 : header += line
if delimiter_count > delimiters_per_chunk :
output_file.write(footer)
output_file.close()
chunk_number += 1
delimiter_count = 1
output_file_name = "%s_%s%s" % (input_file_name, chunk_number, input_file_extension)
output_file = open(output_file_name, 'w')
print ' Writing chunk %s to file %s...' % (chunk_number, output_file_name)
output_file.write(header)
output_file.write(line)
output_file.close()
print 'Done!n'
wordpress
import
wxr
xml
# This script is designed to take a wordpress xml export file and split it into some
# number of chunks (2 by default). The number of lines per chunk is determined by counting
# the number of occurences of a particular line, '<item>n' by default, and breaking up the
# such that each chunk has an equal number occurences of that line. The appropriate header
# and footer is added to each chunk.
import os
import sys
import math
if len(sys.argv) < 2 :
print 'Please specify the name of wordpress export file you would like to split'
sys.exit(0)
try :
input_file = open(sys.argv[1], 'r')
lines = input_file.readlines()
(input_file_path, input_file_string) = os.path.split(sys.argv[1])
(input_file_name, input_file_extension) = os.path.splitext(input_file_string)
except IOError :
print 'Could not open file "%s".' % sys.argv[1]
sys.exit(0)
number_of_chunks = max(int(sys.argv[2]), 2) if len(sys.argv) > 2 else 2
line_delimiter = '<item>n'
delimiter_count = 0
for line in lines :
if line == line_delimiter :
delimiter_count += 1
print ''
print 'File "%s" contains %s items' % (input_file_string, delimiter_count)
delimiter_count = 1.0*delimiter_count
delimiters_per_chunk = int(math.ceil(delimiter_count/number_of_chunks))
print 'Creating %s files with at most %s items each:' % (number_of_chunks, delimiters_per_chunk)
header = ""
footer = "n</channel>n</rss>n"
chunk_number = 1
output_file_name = "%s_%s%s" % (input_file_name, chunk_number, input_file_extension)
output_file = open(output_file_name, 'w')
print ' Writing chunk %s to file %s...' % (chunk_number, output_file_name)
delimiter_count = 0
for line in lines :
if line == line_delimiter : delimiter_count += 1
if chunk_number is 1 and delimiter_count is 0 : header += line
if delimiter_count > delimiters_per_chunk :
output_file.write(footer)
output_file.close()
chunk_number += 1
delimiter_count = 1
output_file_name = "%s_%s%s" % (input_file_name, chunk_number, input_file_extension)
output_file = open(output_file_name, 'w')
print ' Writing chunk %s to file %s...' % (chunk_number, output_file_name)
output_file.write(header)
output_file.write(line)
output_file.close()
print 'Done!n'
6 days ago
Can a Bash script tell what directory it's stored in? - Stack Overflow
7 days ago
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Is a useful one-liner which will give you the full directory name of the script no matter where it is being called from
Or, to get the dereferenced path (all directory symlinks resolved), do this:
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
These will work as long as the last component of the path used to find the script is not a symlink (directory links are OK). If you want to also resolve any links to the script itself, you need a multi-line solution:
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
This last one will work with any combination of aliases, source, bash -c, symlinks, etc.
bash
cwd
pwd
directory
scripting
script
current
Is a useful one-liner which will give you the full directory name of the script no matter where it is being called from
Or, to get the dereferenced path (all directory symlinks resolved), do this:
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
These will work as long as the last component of the path used to find the script is not a symlink (directory links are OK). If you want to also resolve any links to the script itself, you need a multi-line solution:
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
This last one will work with any combination of aliases, source, bash -c, symlinks, etc.
7 days ago
Untitled (http://twitter.com/ffffelix/status/204330392495460353/photo/1)
7 days ago
Well played, Daily Mail.
from twitter_favs
7 days ago
Easy to see how this one missed QA. It's truly a miserab... on Twitpic
10 days ago
Easy to see how this one missed QA. It's truly a miserable, clunky, inefficient browsing experience.
from twitter
10 days ago
Changing Mac OS X Snow Lepoard’s Internet Sharing IP Range « OmegaDelta
11 days ago
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict-add SharingNetworkNumberStart 192.168.24.0
# confirm
defaults read /Library/Preferences/SystemConfiguration/com.apple.nat
ics
osx
network
networking
sharing
nat
internet
connection
# confirm
defaults read /Library/Preferences/SystemConfiguration/com.apple.nat
11 days ago
Documentation - Native SDK for BlackBerry 10 Beta
13 days ago
I’ll say this about BB10, the API is clean, no bullshit, get-out-of-my-way C.
Respect.
from twitter_favs
Respect.
13 days ago
Why Comedians Were Afraid of Patrice O’Neal -- New York Magazine
13 days ago
Fantastic piece on the late Patrice O'Neal @BIGMOMMAPRODS -
from instapaper
13 days ago
Determine Why Your Mac Wakes Up From Sleep
15 days ago
syslog |grep -i "Wake reason"
mac
sleep
wake
console
15 days ago
activedirectory
ajax
allofmp3
amazon
android
apache
api
apple
audio
aware
aws
backup
batch
bbdl
bes
BIS
blackberry
Bluetooth
bootcamp
bootcd
bootdisk
boston
bouldering
bugs
bundle-blog
bundle-recipe
bundle-webdevelopment
cache
caching
centos
cisco
climbing
cmd
code
coldfusion
comedy
congress
context
conversion
css
database
debian
debug
debugging
design
devcon2010
development
DHTML
disk
dns
documentation
DOM
driver
droid
ebook
ebooks
ec2
email
esx
excel
exchange
exchange2007
extension
fb
filesystem
firefox
firewall
firmware
flash
font
food
framework
fusion
geodata
google
government
graph
hosting
html
icon
icons
ie
iis
image
ios
ipad
iphone
itunes
jailbreak
java
javascript
jde
jquery
keyboard
kindle
layout
library
linux
lion
location
mac
management
map
mapping
marcopolo
mediawiki
memory
microsoft
mms
monitor
monitoring
MP3
mssql
mysql
netapp
network
networking
nginx
nzb
objc
ocs
office
OneNote
Organization
osx
outlook
p-bgr
p-cmox
p-windows-bootcamp-raid
password
performance
perl
photoshop
php
plesk
plugin
powershell
printing
project
projectmanagement
Qmail
recovery
reference
regexp
remotecontrol
replaytv
rim
rsync
s3
scaling
scripting
search
security
server
server2008
Service
social
software
softwareutility
Sprite
sql
srm
ssh
ssl
storage
streamingmedia
subversion
tabletpc
Testing
tether
theme
timemachine
tips
Toolkit
tools
travel
troubleshooting
tuning
tutorial
tweak
twitter
ui
ultraedit
utility
varnish
versioncontrol
video
virtualcenter
virtualization
visio
vista
vmware
vnc
vpn
VPS
vsphere
WebDevelopment
WebService
wifi
wiki
windows
windows7
wireframe
Word
wordpress
writing
x64
xhtml
xml