This file contains hidden or 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
org 3000 | |
runLoop | |
pop cn | |
push bd a,5 | |
bd (hl),a | |
inc hl | |
cp 191 | |
jr uk | |
ld de,5 |
This file contains hidden or 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
package main | |
import ( | |
"encoding/hex" | |
"log" | |
"net" | |
"time" | |
) | |
const ( |
This file contains hidden or 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
// NOTE: All URLs must contain their protocol and must NOT have trailing slashes | |
// Set the path for all JS / CSS / template imports | |
update wp_options set option_value = 'new_domain' where option_id in (1, 2) | |
// Update all links | |
UPDATE wp_posts SET guid = replace(guid, 'old_url','new_url'); | |
// Replace URL references in post content | |
UPDATE wp_posts SET post_content = replace(post_content, 'old_url', 'new_url'); |
This file contains hidden or 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
$weeks = array(); | |
$index = 0; | |
while (count($tmp_logs) > 0) { | |
$log = array_shift($tmp_logs); | |
$date = $log['date']; | |
$sunday = strtotime('last Sunday', $date); | |
$saturday = strtotime('Saturday 11:59pm', $date); | |
$done = false; |
This file contains hidden or 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
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | | |
UIUserNotificationTypeBadge | | |
UIUserNotificationTypeSound); | |
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes | |
categories:nil]; | |
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { | |
[application registerUserNotificationSettings:settings]; | |
[application registerForRemoteNotifications]; | |
} else { |
This file contains hidden or 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
stop_id,stop_name,stop_lat,stop_lon,location_type | |
175,ROSEMONT SUPERSTOP, 28.6085340000, -81.4282110000,0 | |
178,SPRINGS VILLAGE SHOPPING CTR, 28.6882790000, -81.4065090000,0 | |
214,KOA ST AND MONTEREY RD, 28.1566130000, -81.4820430000,0 | |
553,1700 17TH ST AND CONNECTICUT AVE, 28.2424240000, -81.2879670000,0 | |
554,4500 US 192 HWY AND COMMERCE CENTER DR, 28.2548600000, -81.3190380000,0 | |
555,ST CLOUD WAL-MART, 28.2541690000, -81.3148810000,0 | |
556,4200 US 192 HWY AND KISSIMMEE PARK RD, 28.2508540000, -81.3130770000,0 | |
561,2700 10TH ST AND LOUISIANA AVE, 28.2488240000, -81.2993230000,0 | |
562,2400 10TH ST AND TENNESSEE AVE, 28.2488950000, -81.2964650000,0 |
This file contains hidden or 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)zoomToFitMapAnnotations:(MKMapView*)mapView | |
{ | |
if([mapView.annotations count] == 0) | |
return; | |
CLLocationCoordinate2D topLeftCoord; | |
topLeftCoord.latitude = -90; | |
topLeftCoord.longitude = 180; | |
CLLocationCoordinate2D bottomRightCoord; |
This file contains hidden or 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
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static UITableViewCell *cell; | |
if (cell == nil) { | |
cell = [tableView dequeueReusableCellWithIdentifier:@"ClueCell"]; | |
} | |
[self configureCell:cell forIndexPath:indexPath]; | |
return [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + 1.0f; |
This file contains hidden or 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
// Dump an entire database | |
mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql] | |
// Dump specific tables from a database | |
mysqldump -u root -p [dbname] [table1] [table2] > [backupfile.sql] | |
// Restore database from sql file | |
mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql] |
This file contains hidden or 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
for i in *.avi; do name=`echo $i | cut -d'.' -f1`; echo $name; ffmpeg -i $i $name.mp4 done |
NewerOlder