A generally agreed upon approach to css and scss (originally composed for BespokeOffers.com)
"Good code is its own best documentation." – Steve McConnell
function updateIn() { | |
let tr = $('td:contains("240112"), td:contains("240113"), td:contains("240114"), td:contains("240115")').parents('tr'); | |
let td = tr && tr.find('td:contains("$4")')[0]; | |
if (!window.hasUpdatedIns && tr && td) { | |
let price = td.innerText; | |
let newPrice = parseFloat(price.replace(/\$|,/gi, "")) - 85.76; | |
let [dollars, cents] = newPrice.toFixed(2).split("."); | |
td.innerText = "$" + Number(dollars).toLocaleString() + "." + cents; | |
window.hasUpdatedIns = true; | |
} |
A generally agreed upon approach to css and scss (originally composed for BespokeOffers.com)
"Good code is its own best documentation." – Steve McConnell
class Steven::Rocks | |
def self.get_icon(appkey, token) | |
# Set temp path | |
path = "/tmp/submit/_icons" | |
# Create temp directory if it doesn't exist | |
if !File.directory?(path) | |
FileUtils.mkdir_p(path) | |
end |
When it comes to IT, the less you know, the more you pay.
As far reaching and prominent as the benefits of technology are, the IT market is still shrouded in complexity, exclusivity, and confusion. This is no accident. Technology companies profit by keeping their products complex.
Small and medium-sized businesses (SMBs) are working hard every day to stay competitive and grow their business, but they don’t get to enjoy the efficiencies and support achieved by technologies that larger companies can afford. What is available for SMBs are expensive and complex solutions with little support.
Company IT decision-makers may be experts in their field, but everyone needs help choosing the right solution for to meet the needs of that business. In the IT market this is the status quo; it is a classic case of the asymmetry of information. The party with fewer resources gets the worse deal.
So, how do you change the status-quo? Another SaaS app? A new marketplace? When built to serve individual companies these produc
I hereby claim:
To claim this, I am signing this object:
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} | |
@return $string; | |
} | |
@mixin transform($trans...) { | |
$fallback: unquote(str-replace(str-replace("#{$trans}", '3d', ''), ', 0)', ')')); |
// Simply pass in the params you want as an object, e.g. addURLParams({ foo: 'bar' }) | |
var addURLParams = function(newParams) { | |
if (!newParams || typeof(newParams) !== 'object') { | |
return false; | |
} | |
var extend = function(out) { | |
out = out || {}; | |
for (var i = 1; i < arguments.length; i++) { |
# jQuery wrapped function for lovely debounced scroll events (using requestAnimationFrame) | |
# Works on IE9+ | |
jQuery.requestScroll = (callback) -> | |
data = window.scrollRequestsData ||= {} | |
requests = data.requests ||= {} | |
# Ideally, using multiple instances prevents conflicts between ticking | |
# It also allows for an easy way to remove the specific scroll event | |
# This performance is still being investigated | |
scrollInstanceNum = Object.keys(requests).length + 1 |
function delete_from_github() { | |
log=$(git log origin/$1..$1 --oneline) | |
if [[ -z "${log}" ]]; then | |
git push origin :$1 | |
git branch -D $1 | |
elif [[ "${log}" == *"path not in the working tree"* ]]; then | |
echo -e "\033[0;31mIt doesn't appear that your branch exists remotely." | |
tput sgr0 | |
while true; do | |
read -p "Are you sure you want to delete this branch? [y/n] `echo $'\n> '`" yn |
<!-- Result: https://cloudup.com/iD68XYKVseY --> | |
<div class="column-parent"> | |
<div class="column--8"> | |
<div class="demo"></div> | |
</div> | |
<div class="column--4"> | |
<div class="demo"></div> | |
</div> |