Skip to content

Instantly share code, notes, and snippets.

View frankstallone's full-sized avatar

Frank Stallone frankstallone

View GitHub Profile
@frankstallone
frankstallone / gist:9398022
Created March 6, 2014 19:53
.htaccess | Send semalt.com to a 403 Forbidden Page
RewriteCond %{HTTP_REFERER} semalt\.com [NC]
RewriteRule ^ - [F,L]
@frankstallone
frankstallone / functionQueue.js
Created March 18, 2014 11:07
Function Queue
var puzzlers = [
function ( a ) { return 8*a - 10; },
function ( a ) { return (a-3) * (a-3) * (a-3); },
function ( a ) { return a * a + 4; },
function ( a ) { return a % 5; }
];
var start = 2;
var applyAndEmpty = function( input, queue ) {
var length = queue.length;
function statusQuestions() {
'use strict';
// Enable/disable whyNoResponse after checking if firm responded.
if ($('#ppcNo').prop('checked') === true) {
$('select[name=whyNoResponse]').prop('disabled', false);
$('input[name=ppcConsult],input[name=ppcCase]').prop('disabled', true);
} else if ($('#ppcYes').prop('checked') === true) {
$('select[name=whyNoResponse]').prop('disabled', true);
$('input[name=ppcConsult],input[name=ppcCase]').prop('disabled', false);
@frankstallone
frankstallone / toggleIndentification.js
Last active August 29, 2015 14:07
Toggles hidden classes and disables/enables input fields based on user select choice
function toggleIdent(v) {
'use strict';
// Defining all varables at the top
var value, ssnField, ssnFieldConfirm, taxField, taxFieldConfirm, socialParent, taxParent;
// Value of selector selection
value = $(v).val();
// Finding all the form fields (Used to enable/disable them)
@frankstallone
frankstallone / anchor-focus.scss
Last active August 29, 2015 14:13
Accessible a:focus starter kit
a {
position: relative;
z-index: 0;
&:focus {
outline: none;
&::before {
background-color: rgba(0,0,0,.1);
border-radius: 2px;
bottom: -4px;
content: ' ';
@frankstallone
frankstallone / .bash_profile
Last active August 29, 2015 14:16
Standard Bash FTW
# Fire up Terminal! Yeehaw!
today=$(date +"%m-%d-%Y")
time=$(date +"%H:%M:%S")
freespace=$(df -h / | grep -E "\/$" | awk '{print $4}')
printf -v d "Current User:\t%s\nDate:\t\t%s @ %s\nFreespace:\t%s\n" $USER $today $time $freespace
echo "$d"
# History Settings
@frankstallone
frankstallone / only-git-all-the-way.sh
Created March 12, 2015 13:47
install node without sudo w/ git
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/joyent/node.git
@frankstallone
frankstallone / ln-html-tag
Created August 30, 2013 12:43
Modification of Paul Irish's HTML tag with IE conditionals and .no-js for Modernizr for LexisNexis Martindale-Hubbell Web Visibility Solution Products
<!--[if lt IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie10 lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie10 lt-ie9 ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="no-js lt-ie10 ie9" lang="en"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
@frankstallone
frankstallone / progressBar.js
Created January 16, 2014 18:34
Generic function for a progress bar. Made with Zurb Foundation in mind.
function progressBar(v) {
'use strict';
var value = parseInt(v);
var currentBar = parseInt($('.meter')[0].style.width.replace(/[^\d]/g, ''));
var newBar = value + currentBar;
if (value + currentBar > 100) {
$('.meter').css('width', '100%');
} else if (value + currentBar < 0) {
$('.meter').css('width', '0%');
@frankstallone
frankstallone / Testimonials
Created November 20, 2013 20:26
HTML5 Blockquote Template for Testimonials including the correct quote character entities, footer and cite tags for proper citation.
<blockquote>
<p>&ldquo;The best client!&rdquo;</p>
<footer>
&mdash; <cite>Anonymous</cite>
</footer>
</blockquote>