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
javascript:(function()%7Bjavascript%3Awindow.location.href%3D'ShortTail%3A%2F%2F'%2Bwindow.location.href%7D)(); |
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
- (void) calculateDates { | |
NSDate *todayDate = [[NSDate alloc] init]; | |
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; | |
NSDateComponents *tomorrowOffset = [[NSDateComponents alloc] init]; | |
[tomorrowOffset setDay:1]; | |
NSDateComponents *yesterdayOffset = [[NSDateComponents alloc] init]; | |
[yesterdayOffset setDay:-1]; | |
NSDate *tomorrowDate = [gregorian dateByAddingComponents:tomorrowOffset toDate:todayDate options:0]; | |
NSDate *yesterdayDate = [gregorian dateByAddingComponents:yesterdayOffset toDate:todayDate options:0]; |
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
#import "UIImage+ImageEffects.h" | |
// Blur view while sidebar is open | |
UIGraphicsBeginImageContext(self.tableView.contentSize); | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(c, 0, 0); | |
[self.view.layer renderInContext:c]; | |
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); | |
viewImage = [viewImage applyBlurWithRadius:3.5 tintColor:nil saturationDeltaFactor:1.4 maskImage:nil]; | |
UIGraphicsEndImageContext(); |
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
<?php | |
function getStatusCodeMessage($status) | |
{ | |
// these could be stored in a .ini file and loaded | |
// via parse_ini_file()... however, this will suffice | |
// for an example | |
$codes = Array( | |
100 => 'Continue', | |
101 => 'Switching Protocols', | |
200 => 'OK', |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Shape Examples</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<svg class="circles" viewBox="0 0 10 5" preserveAspectRatio="xMinYMin meet"> |
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
<?php | |
// Show relative time if more recent than 60 days for post or comment | |
function adamdehaven_human_time_diff( $type = 'post', $duration = 60 ) { | |
if($type == 'comment') { | |
$post_time = get_comment_time('U'); | |
} else { | |
$post_time = get_the_time('U'); | |
} | |
$human_time = ''; |
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
.bgimage { | |
width:100%; | |
height:500px; | |
background: url('https://images.unsplash.com/photo-1438109491414-7198515b166b?q=80&fm=jpg&s=cbdabf7a79c087a0b060670a6d79726c'); | |
background-repeat: no-repeat; | |
background-position: center; | |
background-size:cover; | |
background-attachment: fixed; | |
} | |
.bgimage h5 { |
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
"addAlbumMenus", | |
"addFreeSongs", | |
"addPlaylistMenus", | |
"addSongListToCache", | |
"addSongsToPlaylist", | |
"addSongToList", | |
"addSongToList", | |
"addToAnimation", | |
"albumDeleted", | |
"albumDeleted", |
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
/* ============================================================================= | |
CSS Declarations | |
========================================================================== */ | |
/* ==|== The Standard Way =================================================== */ | |
.foo::before { | |
/* ...css rules... */ | |
} |
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 | |
status=$(curl $1 -s -L -I -o /dev/null -w '%{http_code}') | |
echo $status | |
### Run | |
# $ bash http-status.sh http://google.com/ |
OlderNewer