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
/** | |
* Sets the opacity of the view. This is a value from 0 to 1, where 0 means the view is | |
* completely transparent and 1 means the view is completely opaque. | |
* | |
* @param alpha The opacity of the view. | |
* @param view The view to change. | |
* | |
*/ | |
@TargetApi(Build.VERSION_CODES.HONEYCOMB) | |
public void setOpacity(View view, float alpha) { |
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 | |
usage() { | |
printf "%s\n" "Usage: $0 [-m] [-e] [-o] [-c] [-d]" | |
printf "\t%s\n\t%s\n\t%s\n\t%s\n" \ | |
"-m MySQL only" "-e English only" "-o Output file" \ | |
"-c CSS file to download" "-d Auto-delete time (minutes)" | |
exit 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
upstream app_name { | |
# where the app is running | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 0.0.0.0:80; | |
server_name domain.com; | |
access_log /var/log/nginx/app_name.log; |
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
; CNAME Records | |
mail 3600 IN CNAME ghs.google.com. | |
calendar 3600 IN CNAME ghs.google.com. | |
docs 3600 IN CNAME ghs.google.com. | |
; MX Records | |
@ 3600 IN MX 10 ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 20 ALT1.ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 20 ALT2.ASPMX.L.GOOGLE.COM. | |
@ 3600 IN MX 30 ASPMX2.GOOGLEMAIL.COM. |
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
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
var aTags = document.getElementsByTagName('a'); | |
for (var i = 0; i < aTags.length; i++) { | |
aTags[i].addEventListener('click', function (e) { | |
chrome.tabs.create({url: e.target.href}); | |
}); | |
} |