Skip to content

Instantly share code, notes, and snippets.

View amandasaffer's full-sized avatar
😘
always working

Amanda Saffer amandasaffer

😘
always working
  • SuitShop
  • Boulder, CO
View GitHub Profile
@amandasaffer
amandasaffer / index.html
Created August 24, 2019 22:42
mm/dd/yyyy regex
<input type="text" id="date" placeholder="mm/dd/yyyy">
<button class="pressy">validate</button>
@amandasaffer
amandasaffer / orders.md
Created March 2, 2018 06:34
Some Shopify snippets

You can lookup orders belonging to a customer with the following call:

GET /admin/orders.json?customer_id=207119551

You can retrieve the ID from the search.json endpoint

GET /admin/customers/search.json?query=email:name@hostmail.com&amp;fields=id

@amandasaffer
amandasaffer / .hyper.js
Created May 20, 2017 20:54
Hyper JS Configuration
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@amandasaffer
amandasaffer / minify-liquid.html
Created September 18, 2016 21:11 — forked from sskylar/minify-liquid.html
Simple HTML minify with Liquid/Siteleaf. Strips all line breaks, tabs, and extra spaces.
{% capture html %}
<html>
...
</html>
{% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }}
$(".calculate").click(function() {
event.preventDefault();
//grab values
var chestSize = parseInt($('.chestSize').val());
var waistSize = parseInt($('.waistSize').val());
var height = $(".height").children(":selected").attr("class");
//correct chest and waist values (+1) if odd
function oddCheck(x) {
@amandasaffer
amandasaffer / beanstald.sh
Created July 21, 2016 19:23 — forked from finger-berlin/beanstald.sh
OSX script for easy start & stop beanstalkd (brew version)
#!/bin/sh
daemon=beanstalkd
executable=/usr/local/bin/$daemon
port=11300
waldir=/usr/local/var/beanstalkd
logfile=/usr/local/var/log/beanstalkd.log
interface="127.0.0.1"
params="-l $interface -p $port -b $waldir"
@amandasaffer
amandasaffer / bootstrap-overrides.scss
Created July 14, 2016 23:13
Overrides the default bootstrap behavior in order to wrap rows and also adds a helper class "col-centered" to center any sized column within a row.
/**
*
* Bootstrap Overrides
*
*/
.col-centered{
float: none;
margin: 0 auto;
}
// install composer on Mavericks
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/bin/composer
composer
// upgrade php on mac os x
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0
sudo mv /usr/bin/php /usr/bin/php5424
sudo ln -s /usr/local/php5/bin/php /usr/bin/php
/* Bootstrap Clearfix */
/* Tablet */
@media (min-width:767px){
/* Column clear fix */
.col-lg-1:nth-child(12n+1),
.col-lg-2:nth-child(6n+1),
.col-lg-3:nth-child(4n+1),
.col-lg-4:nth-child(3n+1),
@amandasaffer
amandasaffer / breakpoints.scss
Created April 20, 2016 04:00
Dependency-free breakpoint mixin
/*============================================================================
Dependency-free breakpoint mixin
- http://blog.grayghostvisuals.com/sass/sass-media-query-mixin/
==============================================================================*/
$min: min-width;
$max: max-width;
$small: 480px;
$medium: 768px;
$large: 1200px;