(function (d) {
var w = d.documentElement.offsetWidth,
t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
b;
while (t.nextNode()) {
b = t.currentNode.getBoundingClientRect();
if (b.right > w || b.left < 0) {
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
server { | |
listen 443; | |
server_name my.domain.com; | |
root /var/www/my.domain.com; | |
ssl on; | |
ssl_certificate /usr/local/etc/ssl/star.crt; | |
ssl_certificate_key /usr/local/etc/ssl/star.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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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
# Kernel sysctl configuration file for Red Hat Linux | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Turn on execshield | |
# 0 completely disables ExecShield and Address Space Layout Randomization | |
# 1 enables them ONLY if the application bits for these protections are set to “enable” | |
# 2 enables them by default, except if the application bits are set to “disable” | |
# 3 enables them always, whatever the application bits |
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
/** | |
* When browser supports inline pdfs | |
* There is no need to append a large jquery plugin that displays them inline. | |
* | |
* You can actually use an iframe (and style it appropriately) | |
* or a link whenever inline PDF viewing is not supported | |
* | |
* This function is fairly simple and it's only for demo purposes | |
*/ | |
function appendPdf(id, url) { |
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
server { | |
server_name $domain_name; | |
root /var/www; | |
index index.html index.php; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
# Cache static files for as long as possible | |
location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ { | |
try_files $uri =404; |
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
# paci - install one or more packages | |
# pacu - upgrade all packages to their newest version | |
# pacr - uninstall one or more packages | |
# pacs - search for a package using one or more keywords | |
# pacinfo - show information about a package | |
# pacinstalled - show if a package is installed | |
# paca - list all installed packages | |
# paclo - list all packages which are orphaned | |
# pacdnc - delete all not currently installed package files | |
# pacfiles - list all files installed by a given package |
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
# Hosts file to access US Netflix using Unblock US without their DNS. | |
67.216.222.61 movies.netflix.com | |
67.216.222.65 cbp-us.nccp.netflix.com | |
67.216.222.130 movies1.netflix.com | |
67.216.222.104 movies2.netflix.com | |
147.255.171.14 netflix.com | |
147.255.171.7 moviecontrol.netflix.com | |
69.197.181.166 api-global.netflix.com | |
67.216.222.83 api-us.netflix.com | |
147.255.227.2 api.netflix.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
var message = "hello, how are you Tal?"; | |
if (~message.indexOf('Tal')) { | |
console.log('found matching text'); | |
} |
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
# | |
# Acts as a nginx HTTPS proxy server | |
# enabling CORS only to domains matched by regex | |
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
# | |
# Based on: | |
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
# * http://enable-cors.org/server_nginx.html | |
# | |
server { |