Skip to content

Instantly share code, notes, and snippets.

View frankstallone's full-sized avatar

Frank Stallone frankstallone

View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
/**
* Targetting iPhone X Series of Smartphones
*
*/
$iphone-x-main-nav-height: 80px;
$iphone-x-main-nav-padding: calc(#{$iphone-x-main-nav-height} / 2);
$iphone-x-header-height: $header-height;
$iphone-x-height-offset: $iphone-x-main-nav-height + $iphone-x-header-height;
@frankstallone
frankstallone / cf-whitelist.sh
Last active June 8, 2018 18:00
CloudFlare Bash Whitelist Loop
#!/bin/bash
# Author: Frank Stallone
# $CF_AID, $CF_EMAIL, $CF_API_KEY are exported from .bashrc
# Update $IPLIST and $CF_NOTES
# Test API: Works
# curl -X GET "https://api.cloudflare.com/client/v4/memberships?status=accepted" \
# -H "X-Auth-Email: $CF_EMAIL" \
# -H "X-Auth-Key: $CF_API_KEY" \
# -H "Content-Type: application/json"
@frankstallone
frankstallone / iphone-portrait-media-queries.scss
Created February 9, 2017 12:19
SCSS Mixin for media queries that target iPhone 5/s, 6/s, 6/s Plus in portrait mode
/*
* Media Queries for 📱 5 📱 6 & 📱 6+ in Portrait Mode
*
* Note: Do these in order of smallest to largest
* Example:
*
* @include respond-to(iPhone5) { top: 10px; }
* @include respond-to(iPhone6) { top: 12px; }
* @include respond-to(iPhone6Plus) { top: 14px; }
*
@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 / .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 / 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 / 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)
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 / 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;