Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / eureka_testing.py
Created March 3, 2016 01:14
fun with python click
@click.group()
@click.pass_context
@click.version_option(version='1.0.0')
def main(ctx):
click.echo(click.style('[-] testing eureka...', fg='green'))
# ctx.obj = server
@main.command()
@click.argument("server")
@click.pass_context
@Jarred-Sumner
Jarred-Sumner / comcast.js
Last active September 7, 2022 01:30
Comcast injects this into webpages to show copyright notices
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
, comcastTimer: null
, xmlhttp: null
@samstoller
samstoller / 01-walkthrough.md
Last active October 18, 2018 06:32
How to use wp-cli with a non-standard wp-config.php location

You are running a customized WordPress install where your configurations are NOT located in one of the two required locations (outside the webroot for example) and are receving the following error when running wp-cli commands:

Error: Strange wp-config.php file: wp-settings.php is not loaded directly.

###Solution Simply move the require_once ... wp-settings.php line from the actual configuration file to the end of file that is requiring/including it. See below for examples.

This works by tricking the wp-cli regex into correctly parsing the configuration files.

@phybros
phybros / update-route53.sh
Last active February 12, 2024 00:07
BASH Script to keep Route53 updated with your current external IP address
#!/bin/bash
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g. hello.example.com
@miguelpeixe
miguelpeixe / functions.php
Last active December 18, 2015 08:09
WordPress Advanced Search Example
<?php
function humus_advSearch_query($query) {
if(is_search() && $_REQUEST['tags']) {
$tax_query = array(
'taxonomy' => 'post_tag',
'terms' => $_REQUEST['tags'],
'field' => 'slug'
);
@JeremyMorgan
JeremyMorgan / getdomain.php
Created June 10, 2013 20:08
PHP Function to return a friendly domain name from a URL
/**
* Function to return friendly domain name (example.com) from a full URL
* @param string $url
* @return string
*/
function getDomain($url){
// remove the protocol
$url = str_replace((array("http://", "https://")), "", $url);
@katrinkerber
katrinkerber / Colors.xml
Created May 30, 2011 12:34
Dark Dreamweaver theme based on 'minimal Theme' for TextMate (http://minimaldesign.net/downloads/tools/textmate-theme). Optimised for HTML, CSS, JS and PHP. For installation see http://is.gd/Add9mq. Set background color to #25221C.
<codeColors>
<colorGroup>
<syntaxColor id="CodeColor_HTMLEntity" text="#AECD9D" bold="true" />
<syntaxColor id="CodeColor_JavascriptNative" text="#FCFFE7" />
<syntaxColor id="CodeColor_JavascriptNumber" text="#FBAA21" />
<syntaxColor id="CodeColor_JavascriptClient" text="#FCF296" />
<syntaxColor id="CodeColor_JavascriptSpryKeywords" text="#FF6208" />
<syntaxColor id="CodeColor_JavascriptSpryClasses" text="#FF6208" />
<syntaxColor id="CodeColor_TemplateText" text="#999999" />
<syntaxColor id="CodeColor_TemplateCommentText" text="#82806F" />
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh