- Make sure you have yo installed:
npm install -g yo
- Run:
yo webapp
- Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type=file] { | |
position: relative; | |
-webkit-appearance: textfield; | |
-webkit-box-sizing: border-box; | |
} | |
input[type=file]::-webkit-file-upload-button { | |
border: none; | |
margin: 0; | |
padding: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.customSelect = -> | |
$(this).filter('select').each (i) -> | |
$select = $(this) | |
# make sure we only apply once, no matter how many times called with the same selector | |
return if $select.data('customSelect') | |
$select.data('customSelect', true) | |
title = $select.find('option:first').text() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= link_to 'Download 1', download_path(:symbol1_name) | |
= link_to 'Download 2', download_path(:symbol2_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$test_icons-sprite-map: sprite-map("some-icons/*.png") | |
$test_icons-sprite-names: sprite-names($test_icons-sprite-map) | |
@each $name in $test_icons-sprite-names | |
.some-icon-#{$name} | |
@include sprite-dimensions($test_icons-sprite-map, $name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This file would be inside functions.php or a custom filter plugin that get's imported into functions.php | |
// Added custom validation for minimum character count of a textfield | |
// 4 refers to the form id | |
// 6 refers to the field id in that form | |
// 10 refers to priority the filter has (WP related) | |
// 4 again is an additional parameter for gform, in this case, the id of the form the target field belongs to | |
add_filter("gform_field_validation_4_6", "validate_input_length", 10, 4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to create a valid ID to use | |
# 1. Go to www.twitter.com and sign in as normal, go to your settings page. | |
# 2. Go to "Widgets" on the left hand side. | |
# 3. Create a new widget for what you need eg "user timeline" or "search" etc. | |
# 4. Feel free to check "exclude replies" if you dont want replies in results. | |
# 5. Now go back to settings page, and then go back to widgets page, you should | |
# see the widget you just created. Click edit. | |
# 6. Now look at the URL in your web browser, you will see a long number like this: | |
# 345735903485048478 | |
# 7. Use this as your WIDGET_ID below instead! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helpers do | |
def nav_active(url) | |
if (url.instance_of? String) | |
current_resource.url == url_for(url) ? {class: "active"} : {} | |
elsif (url.instance_of? Array) | |
url.map { |url| url_for(url) }.include?(current_resource.url) ? {class: "active"} : {} | |
else | |
{} | |
end | |
end |
I hereby claim:
- I am pzi on github.
- I am pzi (https://keybase.io/pzi) on keybase.
- I have a public key whose fingerprint is FF3F 1C96 C62C 6000 5271 96A6 E99A 9CE4 AB53 A92F
To claim this, I am signing this object:
OlderNewer