Skip to content

Instantly share code, notes, and snippets.

View davidkryzaniak's full-sized avatar

David Kryzaniak davidkryzaniak

View GitHub Profile
array(8) {
["00:00:00:00:00:00"]=>
array(2) {
["name"]=>
string(0) "***********"
["ip"]=>
string(12) "192.168.1.34"
}
["00:00:00:00:00:00"]=>
array(2) {
function custom_top_navigation()
{ ?>
<h3 class="assistive-text"><?php _e( 'Menu', 'getnoticed' ); ?></h3>
<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'getnoticed' ); ?>"><?php _e( 'Skip to content', 'getnoticed' ); ?></a></div>
<div id="primary-menu">!
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'fallback_cb' => false, 'depth' => 2 ) ); ?>
</div>
<?php getnoticed_social( array( 'class' => 'social', 'theme_location' => 'header' ) ); ?>
<div class="mobile_actions">
$(function(){
//bind on paste action
$('input,textarea').on('paste', function () {
var element = this; //grab the element that was pasted into
setTimeout(function () {
var text = $(element).val();
text = text
.replace(/\u2013|\u2014/g, "-") //Fix dashes
.replace(/[\u2018\u2019]/g, "'") //Fix single quotes
.replace(/[\u201C\u201D]/g, '"'); //Fix double quotes
var page = require('webpage').create();
var agents = Array(
'Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19',
'Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3',
'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3',
'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36',
'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36',
.twitter > i{ background-color: #00ACED; }
.facebook > i{ background-color: #3B5998; }
.rssfeed > i{ background-color: #FA9934; }
.pinterest > i{ background-color: #CB2027; }
.google > i{ background-color: #D14836; }
.googleplus > i{ background-color: #D14836; }
.linkedin > i{ background-color: #0072B3; }
.email > i{ background-color: #7199DF; }
.youtube > i{ background-color: #C4302B; }
.vimeo > i{ background-color: #44BBFF; }
@media print{
html::before{content:'Really?! Printing is so 1994...'}
body{display:none}
}
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
var locations = [
['Trip to X - Nov, 4th 2014', 47.06976, 15.43154, 1],
['Trip to Y - Oct, 1st 2012', 47.06975, 15.43116, 2],
['Trip to X - Oct, 1st 2012', 47.09399, 15.40548, 3],
['Trip to A - Oct, 1st 2012', 47.06993, 15.40727, 4],
['Trip to B - Oct, 1st 2012', 47.06934, 15.45888, 5],
['Trip to C - Oct, 1st 2012', 47.04572, 15.43234, 6],
['Trip to D - Oct, 1st 2012', 47.08350, 15.43212, 7],
#!/bin/sh
# The mac address of your Dash. Like: 74:75:48:b9:80:fb
MACADDR=
# Number of seconds to wait in between checks
INTERVAL=3
# Number of seconds to sleep after the button is pressed
WAITFOR=60
Davids-MacBook-Pro:~ davidkryzaniak$ ssh root@192.168.1.1
root@192.168.1.1's password:
Tomato v1.28.0000 MIPSR2-108 K26 IPv6-VPN
root@unknown:/tmp/home/root# vi amazon-dash-watcher.sh
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$ua = $_SERVER['HTTP_USER_AGENT'];
//User agent must be set to "**MY-SECRET-USER-AGENT**" and the ?secret must be "key"
if("**MY-SECRET-USER-AGENT**" == $ua && isset($_GET['secret']) && "key" == $_GET['secret']){