Skip to content

Instantly share code, notes, and snippets.

View zeroasterisk's full-sized avatar

alan blount zeroasterisk

View GitHub Profile
@zeroasterisk
zeroasterisk / notes
Created June 2, 2015 17:46
Dart scan for terms
In this example, I am scanning for all of these classes
https://github.com/awatson1978/clinical-ui-vocabulary/
@zeroasterisk
zeroasterisk / HttpsUrlTestShell.php
Last active August 29, 2015 14:19
Check any HTTPS URL to validate it - CakePHP Shell/Command
<?php
/**
* Check any HTTPS URL to validate it
*
* - checkdomain verifies the SSL cert only (working, slow)
* - checkcurl verifies the URL can be loaded via CURL (not working)
*
*/
App::uses('HttpSocket', 'Utility');
@zeroasterisk
zeroasterisk / benchmark-loops.php
Last active August 29, 2015 14:19
Simple Loop Benchmarker
<?php
/**
* Simple Benchmarker for PHP While Loops
*
* USES pcntl_fork() to split to different processes,
* so we assure RAM utilization doesn't "bleed"
*
* Usage:
* We are using php files for the large test, just to get a bunch of "random"
@zeroasterisk
zeroasterisk / nightwatch
Created April 20, 2015 18:23
nightwatch test runner script
#!/usr/bin/env node
// -------------------
// nightwatchjs script running
// - automatically downloads the selenium jar if missing
// - automatically passes through all arguments to the runner.js
// -------------------
var fs = require('fs');
var path = 'Vendor/selenium-server-standalone-2.44.0.jar';
@zeroasterisk
zeroasterisk / fragment-of-nginx.conf
Created April 2, 2015 02:45
nginx config for client asset optimizations
http {
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_min_length 0;
gzip_types text/plain text/css text/javascript text/xml application/xml application/xml+rss application/x-javascript image/x-icon;
@zeroasterisk
zeroasterisk / keybase.md
Last active August 29, 2015 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am zeroasterisk on github.
  • I am zeroasterisk (https://keybase.io/zeroasterisk) on keybase.
  • I have a public key whose fingerprint is CC3A 090E 2012 05DF 18A8 0928 D5CC A0D0 068D B533

To claim this, I am signing this object:

@zeroasterisk
zeroasterisk / rsc_files_containers_urls.py
Created October 14, 2014 15:47
Rackspace API Cloud Files - List all Container URLs and Metadata (pyrax)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ----------------------------------------
#
# Setup:
# $ sudo pip install --upgrade git+git://github.com/rackspace/pyrax.git
# $ vim ~/.rackspace_cloud_credentials
# [rackspace_cloud]
@zeroasterisk
zeroasterisk / jQuery-selector-for-input-values.js
Created July 29, 2014 21:28
Custom jQuery selector for Input values
/**
* Custom jQuery selector
* :val("inputvalue")
*
* usage: $('input:val("foo")')
*/
jQuery.extend(jQuery.expr[':'], {
val: function (el, i, meta) {
return meta[3] == jQuery(el).val();
}