Skip to content

Instantly share code, notes, and snippets.

@Crawleyprint
Crawleyprint / Custom.css
Created January 13, 2012 14:41 — forked from lensco/Custom.css
User stylesheet to customize the WebKit Inspector (cleaning up and improving the styles panel). See http://bricss.net/post/9076968710/customize-the-webkit-inspector-chrome-dev-tools
.monospace {
font: 11px/1.3 Monaco !important;
}
/* slightly larger indentation of source code */
.outline-disclosure ol {
-webkit-padding-start: 18px !important;
}
/* margin underneath styles panel heading */
@Crawleyprint
Crawleyprint / httpd-vhosts.conf
Created July 18, 2012 10:41
Valid htaccess for shippingeasy
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
@Crawleyprint
Crawleyprint / clippy
Created July 18, 2012 11:42
copy to Clipboard
<script type="text/javascript">
$(function() {
ZeroClipboard.setMoviePath( GLOBAL_BASE_URL + "js/vendor/clippy/ZeroClipboard10.swf" );
var clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
clip.setText($.trim($("#api-key").text()));
clip.glue("api-copy-button", "copy-container");
});
</script>
#!/bin/bash
echo "Update Started" && \
cd $(dirname $0)/.. && \
SE=$(pwd) && \
echo $SE && \
rm web/js/build/*.* && \
echo "Updating submodules..." && \
git submodule init && \
git submodule update && \
@Crawleyprint
Crawleyprint / tmp
Created September 17, 2012 15:26
temp
<option <% if (this.PickupTimesPrepared.length === 1 && pickup.id === 'dropoff') { %> selected <% } %> value="<%= pickup.id %>"><%= pickup.text %></option>
[
{
"CollectionCountry": "US",
"CollectionCity": "New York",
"CollectionZip": "10001",
"CollectionCountryDivision": "NY",
"DestinationCountry": "US",
"DestinationCity": "New York",
"DestinationZip": "10001",
"DestinationCountryDivision": "NY",
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "../"
css_dir = "css/build"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
generated_images_dir = images_dir + "/sprites/"
relative_assets = true
<script>
$('#login').click(function() {
$.post(
"/",
{
username: $("#id_username").val(),
password: $("#id_password").val(),
csrfmiddlewaretoken: $.cookie("csrftoken"),
next: $("#id_next").val()
},
@Crawleyprint
Crawleyprint / push.scss
Last active August 29, 2015 14:06
Push classes generator
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
/**
* PUSH CLASSES GENERATOR
**/
$directions: top, left, right, bottom, sides, ends; // define sides that will have margin
@Crawleyprint
Crawleyprint / copy-hooks.js
Last active September 28, 2017 02:37
Frontend automation with git hooks and npm
var path = require('path');
// we need to require fs.extra because node's fs module doesn not have copy
// method.
// We could create our own, but this works as well.
var fs = require('fs.extra');
var appRoot = path.resolve(__dirname);
// 2 arguments are needed, one for determining hook type
// and other one for source file name