Skip to content

Instantly share code, notes, and snippets.

View peterblazejewicz's full-sized avatar
:octocat:
@code #remote #ssh #raspberrypi

Piotr Błażejewicz (Peter Blazejewicz) peterblazejewicz

:octocat:
@code #remote #ssh #raspberrypi
View GitHub Profile
@peterblazejewicz
peterblazejewicz / gist:10094284
Created April 8, 2014 05:30
local content jQuery load
$(function(){
'use strict';
$(document.body).on('click', '.btn', function(event){
var btn = $(event.currentTarget);
$('#container').load('./bower_components/jquery/AUTHORS.txt', function(){
btn.attr('disabled', true);
btn.text('Loaded');
btn.addClass('btn-success');
});
});
.progress-steps {
display: table;
position: relative;
width: 100%;
}
.progress-steps > .row {
display: table-cell;
width: 100%;
}
.progress-steps .row:before {
@peterblazejewicz
peterblazejewicz / gist:dc3ee3a918f355e2157c
Created May 16, 2014 21:23
Add attribute (spellcheck) to Bootstrap modal at runtime
$(function(){
$(document.body).on('show.bs.modal', '.bootbox.modal', function(event){
$(event.target).find('input[type="text"]').attr('spellcheck', false);
});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
/*
* Web Starter Kit
*
* Multi-screen layout styles for your page. Brought to you by the
* Web Starter Kit team.
*
*/
html, body {
width: 100%;
@import "../../bootstrap/mixins.less";
@import "../../bootstrap/variables.less";
@import "../my-variables.less";
#buttons {
@padding-base-vertical: 5px;
@padding-base-horizontal: 10px;
@padding-large-vertical: 6px;
@padding-large-horizontal: 12px;
@padding-small-vertical: 4px;
@padding-small-horizontal: 8px;
generator-polymer git:(add/page-default-title) ✗ npm test
> generator-polymer@0.5.1 test /Users/piotrblazejewicz/git/generator-polymer
> jshint {app,el,gh,seed}/*.js && mocha --reporter spec
yo polymer:app test
✓ the generator can be required without throwing
@peterblazejewicz
peterblazejewicz / gist:7e96aadf78f1ac47787d
Created November 23, 2014 20:03
/Users/piotrblazejewicz/git/jsbin npm test
npm test
> jsbin@3.23.8 test /Users/piotrblazejewicz/git/jsbin
> node_modules/mocha/bin/_mocha -t 25000 --ui bdd test/**/*.test.js
Gruntfile
/Users/piotrblazejewicz/git/jsbin/Gruntfile.js
{ stdout: '\u001b[4mRunning "concat:dist" (concat) task\u001b[24m\nFile "public/js/prod/jsbin-3.23.8.js" created.\n\n\u001b[4mRunning "concat:runner" (concat) task\u001b[24m\nFile "public/js/prod/runner-3.23.8.js" created.\n\n\u001b[4mRunning "uglify:dist" (uglify) task\u001b[24m\nFile "public/js/prod/jsbin-3.23.8.min.js" created.\n\n\u001b[4mRunning "uglify:runner" (uglify) task\u001b[24m\nFile "public/js/prod/runner-3.23.8.min.js" created.\n\n\u001b[4mRunning "uglify:addons" (uglify) task\u001b[24m\nFile "public/js/prod/addon-tern-3.23.8.min.js" created.\n\n\u001b[32mDone, without errors.\u001b[39m',
@peterblazejewicz
peterblazejewicz / Default.cshtml
Created January 6, 2015 20:04
vNext ViewComponent boilerplate built upon aspnet-generator's mvc sample (note: check paths in commented code)
@* Views/Home/Shared/Components/PageHeader/ *@
@using MvcSample.Web
@model PageHeader
<div class="page-header">
<h1>Hello, @Model.FullName <small>Last visit: @Model.LastVisit</small></h1>
</div>