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
Main() { | |
NR_OF_MONITORS=$(xrandr | grep -v disconnected | grep -c connected) | |
if [ $NR_OF_MONITORS = 1 ]; then | |
oneMon | |
fi | |
if [ $NR_OF_MONITORS = 2 ]; then | |
twoMon | |
fi |
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
/****************** | |
Name: | |
Project: | |
Purpose: | |
******************* /* | |
#include <iostream> | |
using namespace std; |
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
//Requires jQuery - http://code.jquery.com/jquery-1.6.4.min.js | |
$(document).ready(function() { | |
var idleMouseTimer; | |
var forceMouseHide = false; | |
$("body").css('cursor', 'none'); | |
$("#wrapper").mousemove(function(ev) { | |
if(!forceMouseHide) { | |
$("body").css('cursor', ''); |
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
<table id="list"> | |
<tr> | |
<th class='sort alpha' id='0'>Email Address</th> | |
<th class='sort date' id='1'>Date Added</th> | |
<th class='sort alpha' id='2'>Referral Link</th> | |
<th class='sort num' id='3'># Referrals</th> | |
<th>Aprove Users</th> | |
<th></th> | |
</tr> | |
<tr> |
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 isEven($g, $isIt = false) { | |
$g--; | |
$isIt = !$isIt; | |
if($g <= 0) { | |
if($isIt === TRUE) { | |
echo "$ g is even!"; | |
return true; | |
} elseif($isIt === 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
var html = "<body><div id='test'><script type='text/javascript' src='http://testScript.com'></script><img src='http://www.google.com' /><img class='test1' src='http://www.test.com' /><img src='http://woot.com' class='test2' /></div></body>"; | |
html.replace(/<img [^>]*src=["']([A-Za-z0-9\%\?\=\&\:\/\\\.]+)["']/gi, function(full,match) { | |
return full.replace(match, "http://my.cdn.com?url=" + escape(match)) | |
}); | |
//Outputs: | |
//"<body><div id='test'><script type='text/javascript' src='http://testScript.com'></script><img src='http://my.cdn.com?url=http%3A//www.google.com' /><img class='test1' src='http://my.cdn.com?url=http%3A//www.test.com' /><img src='http://my.cdn.com?url=http%3A//woot.com' class='test2' /></div></body>" |
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 | |
PREPHANTOMTIME=`date +%s%N | cut -b1-13` | |
count="0" | |
while [ $count -lt $2 ]; | |
do | |
phantomjs --load-images=no ./timer.js "$1" > /dev/null 2>&1 | |
count=$[$count + 1] | |
echo -ne "." | |
done |
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
/* | |
* Really all this does so far is give a score based on how much the element protrudes off the center. Center content is usually the focus | |
*/ | |
function getOffset( el ) { | |
var _x = 0; | |
var _y = 0; | |
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) { | |
_x += el.offsetLeft - el.scrollLeft; | |
_y += el.offsetTop - el.scrollTop; |
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 page = require('webpage').create(); | |
if(phantom.args.length < 1) { | |
phantom.exit(); | |
} else { | |
var address = phantom.args[0]; | |
page.onError = function() { }; | |
page.open(address, function(status) { |
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(console.log && !logsOn) { //If console.log exists, override it with you safe log check | |
console.log = function() { }; | |
} |
OlderNewer