This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Chrome, Firefox OS and Opera --> | |
<meta name="theme-color" content="#4285f4"> | |
<!-- Windows Phone --> | |
<meta name="msapplication-navbutton-color" content="#4285f4"> | |
<!-- iOS Safari --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="#4285f4"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$white: #ffffff; | |
$black: #000000; | |
$red50: #ffebee; | |
$red100: #ffcdd2; | |
$red200: #ef9a9a; | |
$red300: #e57373; | |
$red400: #ef5350; | |
$red500: #f44336; | |
$red600: #e53935; | |
$red700: #d32f2f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# in ~/Sites directory | |
for D in *; do | |
if [ -d "${D}" ]; then | |
wp --path=$D/ core update | |
wp --path=$D/ theme update --all | |
wp --path=$D/ plugin update --all | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# First do apt-get update | |
/usr/bin/sudo apt-get update | |
# Then the upgrade | |
/usr/bin/sudo apt-get -y upgrade | |
# Finally rpi-update | |
/usr/bin/sudo rpi-update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo find wp-content/ -type f -exec chmod 644 {} \; | |
sudo find -type f -exec chmod 644 {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType text/css "access 1 month" | |
ExpiresByType text/html "access 1 month" | |
ExpiresByType application/pdf "access 1 month" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir myproject | |
$ cd myproject | |
$ virtualenv venv | |
New python executable in venv/bin/python | |
Installing distribute............done. | |
Now, whenever you want to work on a project, you only have to activate the corresponding environment. On OS X and Linux, do the following: | |
$ . venv/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let smartAlbums = PHAssetCollection.fetchAssetCollectionsWithType(.SmartAlbum, subtype: .AlbumRegular, options: nil) // Here you can specify Photostream, etc. as PHAssetCollectionSubtype.xxx | |
smartAlbums.enumerateObjectsUsingBlock( { | |
if let assetCollection = $0.0 as? PHAssetCollection { | |
print("album title: \(assetCollection.localizedTitle)") | |
// One thing to note with Smart Albums is that collection.estimatedAssetCount can return NSNotFound if estimatedAssetCount cannot be determined. As title suggest this is estimated. If you want to be sure of number of assets you have to perform fetch and get the count like: | |
let assetsFetchResult = PHAsset.fetchAssetsInAssetCollection(assetCollection, options: nil) | |
let numberOfAssets = assetsFetchResult.count | |
let estimatedCount = (assetCollection.estimatedAssetCount == NSNotFound) ? -1 : assetCollection.estimatedAssetCount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode |