Skip to content

Instantly share code, notes, and snippets.

var doScrape = function () {
var productTemplate = "{{#.}}"
+ "<form method='post' action='SOME_URL' class='riu-form'>"
+ "<a class='riu-logo' href='http://rackituponline.com'>Rack It Up</a>"
+ "<img src='{{OrigImageURL}}' class='riu-img'>"
+ "<h1>{{Name}}</h1>"
+ "<label>Price:</label>"
+ "<input type='text' value='{{OrigPrice}}' readonly>"
+ "<label>Color:</label>"
// + "<p>Colors: {{#Colors}}{{.}}, {{/Colors}}</p>"
@jshawl
jshawl / Gruntfile.js
Last active January 18, 2023 13:52
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
---
layout: invoice
status: paid | unpaid | late
deliverables:
item:
description: made site responsive
price: $1,000
item:
description: changed logo color
price: $300
@jshawl
jshawl / pretty.html
Last active December 21, 2015 18:39
<div class="box">
<div class="child">
<div class="some-children">
<div class="more-children">
</div><!--//more-children-->
</div><!--//some-children-->
</div><!--//child-->
</div><!--//box-->
@jshawl
jshawl / ghost.jshawl.com
Created October 18, 2013 23:57
a working config file for an nginx vhost
server {
listen 80;
server_name ghost.jshawl.com;
root /var/www/ghost.jshawl.com;
index index.php;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
@jshawl
jshawl / SassMeister-input.scss
Created November 24, 2013 14:57
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/* Variables */
$green:#bada55;
body{
color:$green;
var array = [1,2,3,5,10,9,8,9,10,11,7];
function findConsecutiveRuns(array){
var consecutiveRuns = new Array();
for (index=0;index<array.length;index++){
var one = parseInt(array[index]);
var two = parseInt(array[index+1]);
var three = parseInt(array[index+2]);
if (one+1==two && two + 1 == three){
// consecutive increasing: 1,2,3
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
build: {
src: 'dist/scripts.js',
<body>
<form method="post" action="<?php $_SERVER['REQUEST_URI'] ?>" >
X= <input type="text" name="x" /> <br />
Y= <input type="text" name="y" /> <br />
Diferença= <select name="expressao">
<option value=">"> > </option>
<option value="<"> < </option>
<option value="="> = </option>
</select>

Vim Alphabet

a

a enter into insert mode after the character your cursor is on

A enter into insert mode at the end of the current line

b