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
def parse(domain, psl): | |
fuzzy_hosts = ('www', 'mobile', 'm') | |
domain_parts = domain.split('.') | |
if domain_parts[0] in fuzzy_hosts: | |
domain_parts = domain_parts[1:] | |
if '.'.join(domain_parts[1:]) in psl: | |
return sorted(['.'.join(domain_parts)] + \ | |
['.'.join([fuzzy_host] + domain_parts) for fuzzy_host in fuzzy_hosts]) | |
else: | |
return sorted([domain]) |
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
function isLoggedIn(successCallback, failureCallback) { | |
chrome.identity.getAuthToken(function() { | |
if (chrome.runtime.lastError) | |
failureCallback(); | |
else | |
successCallback(); | |
}); | |
} |
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.identity.getAuthToken({ 'interactive': true }, function() { | |
if (!chrome.runtime.lastError) { | |
console.log("requestAuthorization: Authorized"); | |
authorized(); | |
} | |
}); |
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
BrowserContextKeyedService* DomDistillerServiceFactory::BuildServiceInstanceFor( | |
content::BrowserContext* profile) const { | |
scoped_refptr<base::SequencedTaskRunner> background_task_runner = | |
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | |
content::BrowserThread::GetBlockingPool()->GetSequenceToken()); | |
scoped_ptr<DomDistillerDatabase> db(new DomDistillerDatabase(background_task_runner)); | |
base::FilePath database_dir(FILE_PATH_LITERAL("/data/local/tmp/myreadinglist")); |
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
$ cat <(echo 1) <(echo 2) | grep 2 | |
2 |
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
[alias] | |
branch-point = merge-base HEAD @{u} | |
brdiff = ! git diff -M $(git branch-point) |
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
{ | |
'GYP_DEFINES': 'clang=1 use_goma=1 component=shared_library fastbuild=1 disable_nacl=1', | |
} |
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
language: java | |
before_install: sudo apt-get update | |
install: sudo ./install-build-deps.sh | |
before_script: | |
- "export DISPLAY=:99.0" | |
- "sh -e /etc/init.d/xvfb start" | |
script: sudo ant test |
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
$ for jdk in 6 7; do for runtime in 6 7; do /usr/lib/jvm/java-${jdk}-openjdk-amd64/bin/javap -s java${runtime}/java/util/HashSet.class; done; done; | |
Compiled from "HashSet.java" | |
public class java.util.HashSet<E> extends java.util.AbstractSet<E> implements java.util.Set<E>, java.lang.Cloneable, java.io.Serializable { | |
static final long serialVersionUID; | |
Signature: J | |
public java.util.HashSet(); | |
Signature: ()V | |
public java.util.HashSet(java.util.Collection<? extends E>); | |
Signature: (Ljava/util/Collection;)V |
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> | |
<key>Label</key> | |
<string>limit.maxproc</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
OlderNewer