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
-- | Comment combinator. `if` is included, so only condition is needed. E.g., | |
-- | |
-- > comment "lt IE 7" | |
comment :: String -> Html -> Html | |
comment cond = Parent "comment" (ss cond') "<![endif]-->" | |
where cond' = "<!--[if " ++ cond ++ " ]" | |
ss s = StaticString (s ++) (C8.pack s) (T.pack s) |
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
{- These imports will serve us for the remainder of the post -} | |
import Text.Blaze.Internal | |
import Text.Blaze.Html5 | |
import Text.Blaze.Html5.Attributes | |
import qualified Data.ByteString.Char8 as C8 | |
import qualified Data.Text as T | |
-- | HTML tag with no closing. | |
html' :: Html -> Html | |
html' = Parent "html" "<html" "" |
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
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><html lang="en"><![endif]--> |
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
BEGIN:vCard | |
VERSION:3.0 | |
FN:Frank Dawson | |
N:Dawson;Frank;;; | |
ORG:Lotus Development Corporation | |
ADR;TYPE=WORK,POSTAL,PARCEL:;;6544 Battleford Drive;Raleigh;NC;27613-3502;U.S.A | |
TEL;TYPE=VOICE,MSG,WORK:+1-919-676-9515 | |
TEL;TYPE=FAX,WORK:+1-919-676-9564 | |
EMAIL;TYPE=INTERNET,PREF:[email protected] | |
EMAIL;TYPE=INTERNET:[email protected] |
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 Text.VCard | |
vc = VCard "Frank Dawson" | |
(IndividualNames ["Dawson"] ["Frank"] [] [] []) | |
[ Organization ["Lotus Development Corporation"] | |
, Address [AddrWork, AddrPostal, AddrParcel] "" "" | |
"6544 Battleford Drive" | |
"Raleigh" "NC" "27613-3502" "U.S.A" | |
, Telephone [TelVoice, TelMessage, TelWork] "+1-919-676-9515" | |
, Telephone [TelFax, TelWork] "+1-919-676-9564" |
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
try { // Old addon manager | |
let gExtensionManager = Components.classes[ | |
"@mozilla.org/extensions/manager;1"] | |
.getService(Components.interfaces.nsIExtensionManager); | |
let version = gExtensionManager.getItemForID( | |
"[email protected]").version; | |
Charlifter.Lifter.init(version); | |
} catch(err) { // New addon manager | |
Charlifter.Util.log(err); | |
Components.utils.import("resource://gre/modules/AddonManager.jsm"); |
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
/* | |
This file is part of Accentuate.us. | |
Accentuate.us is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
Accentuate.us is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- ...Source above redacted for brevity --> | |
<key>CFPlugInUnloadFunction</key> | |
<string></string> | |
<!-- new material --> | |
<key>LSBackgroundOnly</key> |
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 "Services.h" | |
@implementation Services | |
- (void)accentuate:(NSPasteboard *)pboard | |
userData:(NSString *)data | |
error:(NSString **)error { | |
NSString *text; | |
NSArray *types; | |
types = [pboard types]; |
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 <Cocoa/Cocoa.h> | |
@interface Services : NSObject { | |
} | |
- (void)accentuate:(NSPasteboard *)pboard | |
userData:(NSString *)data | |
error:(NSString **)error; | |
@end |