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 "NSString+BashEscaping.h" | |
@implementation NSString (NSString_BashEscaping) | |
- (NSString *)bashString { | |
NSString *escapedString = [[self | |
stringByReplacingOccurrencesOfString:@"'" withString:@"'\\''"] | |
stringByReplacingOccurrencesOfString:@"!" withString:@"\\!"]; | |
return [NSString stringWithFormat:@"'%@'", escapedString]; |
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
initialize: function(elem) { | |
this.content = $(elem); | |
}, | |
actions: function(){ | |
this.content.select('.lbAction').each(function(lbAction) { | |
lbAction.observe('click', this[lbAction.rel]); | |
lbAction.onclick = function() { return false }; | |
}, this); | |
return this; |
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
getViewportScrollY = function() { | |
var scrollY = 0; | |
if( document.documentElement && document.documentElement.scrollTop ) { | |
scrollY = document.documentElement.scrollTop; | |
} | |
else if( document.body && document.body.scrollTop ) { | |
scrollY = document.body.scrollTop; | |
} | |
else if( window.pageYOffset ) { | |
scrollY = window.pageYOffset; |
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
class CmuLdap | |
BASE_DN = 'ou=Person, dc=cmu, dc=edu' | |
def self.find_by_principal_name(name) | |
new.search(:filter => Net::LDAP::Filter.eq('cmuPersonPrincipalName', name)) | |
end | |
def self.find_by_andrew_id(username) | |
new.search(:filter => Net::LDAP::Filter.eq('cmuAndrewID', username)) | |
end |
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
Fluency.form.AccountMiniForm = Ext.extend(Fluency.form.AbstractMiniForm, { | |
title: 'New Contact', | |
defaultItems: [{ | |
xtype : 'textfield', | |
name : 'Name', | |
hiddenName : 'Name', | |
fieldLabel : 'Name', | |
width : '95%' | |
}, { |
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
tcp 0 0 RODDICK.THET:afpovertcp IMAC1.THETARTAN.O:54458 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp MINI6.THETARTAN.O:49350 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp c-67-186-59-121.h:51064 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp IMAC3.THETARTAN.O:49632 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp PMG5.THETARTAN.OR:49678 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp c-24-3-18-7.hsd1.:39438 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp MINI5.THETARTAN.O:49574 ESTABLISHED | |
tcp 0 0 RODDICK.THET:afpovertcp 128.237.229.215:56034 ESTABLISHED |
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
$ ./ping_test.sh | |
roddick: 4 packets transmitted, 4 packets received, 0% packet loss | |
directory: 4 packets transmitted, 0 packets received, 100% packet loss | |
mini1: 4 packets transmitted, 0 packets received, 100% packet loss | |
mini2: 4 packets transmitted, 4 packets received, 0% packet loss | |
mini3: 4 packets transmitted, 4 packets received, 0% packet loss | |
mini4: 4 packets transmitted, 0 packets received, 100% packet loss | |
mini5: 4 packets transmitted, 4 packets received, 0% packet loss | |
mini6: 4 packets transmitted, 0 packets received, 100% packet loss | |
mini7: 4 packets transmitted, 0 packets received, 100% packet loss |
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
MROCH:tartan lroch$ rake tartan:maintenance:fix_duplicate_slugs | |
(in /Users/lroch/Sites/tartan/git/tartan) | |
Found 2 duplicates for slug "thedavincieffectlackssubstance" in edition 28, section 4 | |
765: | |
(status Published; created Wed Oct 13 17:36:03 -0400 2004; updated Mon Oct 18 12:36:39 -0400 2004) | |
3082: | |
(status Published; created Wed Oct 13 17:36:03 -0400 2004; updated Mon Oct 18 12:36:39 -0400 2004) | |
Found 14 duplicates for slug "" in edition 39, section 2 | |
1214: Racism on Hot97 |
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 <UIKit/UIKit.h> | |
@interface ClickCountAppDelegate : NSObject <UIApplicationDelegate> { | |
UIWindow *window; | |
UILabel *label; | |
} | |
@property (nonatomic, retain) IBOutlet UIWindow *window; | |
@property (nonatomic, retain) IBOutlet UILabel *label; | |
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
mysql> explain SELECT u.facebook_uid | |
-> FROM users u | |
-> INNER JOIN schedules s ON s.user_id = u.id AND u.id <> 1 | |
-> INNER JOIN schedule_courses sc ON sc.schedule_id = s.id | |
-> INNER JOIN sections se ON sc.section_id = se.id AND se.course_id = 426; | |
+----+-------------+-------+--------+---------------------------------------+---------------------------------------+---------+---------------------------------+------+--------------------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+-------+--------+---------------------------------------+---------------------------------------+---------+---------------------------------+------+--------------------------+ | |
| 1 | SIMPLE | u | index | PRIMARY | index_users_on_facebook_uid | 258 | NULL |
NewerOlder