Skip to content

Instantly share code, notes, and snippets.

View stefanjudis's full-sized avatar
🙉
Jo!

Stefan Judis stefanjudis

🙉
Jo!
View GitHub Profile
@stefanjudis
stefanjudis / command.js
Last active July 28, 2016 15:48
stderr & stdout order is puzzled
this.processCmd = options.isCustom ?
`npm run ${ script.name }` :
script.command;
this.$set( 'process', this.exec(
this.processCmd,
{
cwd : options.cwd
}
) );
@stefanjudis
stefanjudis / stayScrolledDown.vue
Last active May 3, 2023 18:33
ScrollContainer always on bottom using MutationObserver using a vue.js directive
export default {
bind() {
let element = this.el;
this.observer = new MutationObserver( ( mutations ) => {
for ( var i = 0; i < mutations.length; i++ ) {
// adjust element scrollTop depending on it's changed height
element.scrollTop = element.scrollHeight;
}
} ) ;
var SLOW_TIME = 3000;
this.addEventListener( 'install', function () {
console.log('Installed service worker');
} );
this.addEventListener( 'fetch', function(event) {
var url = event.request.url;
if ( url.indexOf( 'blocking' ) === -1) {
@stefanjudis
stefanjudis / log
Created October 29, 2015 21:07
DEBUG=* node test.js
stefan @ stefan-mac: ~/Sites/grunt-phantomas master (╯°□°)╯
> DEBUG=* node test.js [21:22:13]
1.13.0
phantomas nodejs v4.1.1 +0ms
phantomas phantomas v1.13.0 installed in /Users/stefan/Sites/grunt-phantomas/node_modules/phantomas +2ms
phantomas URL: <http://www.carfax.es/lp-coches-de-segunda-mano.html> +1ms
phantomas Options: {"timeout":30,"film-strip":true,"film-strip-dir":"phantomas/images/1445626863104"} +0ms
phantomas Temporary directory: /var/folders/03/cgg2bwfd6j92tfllylt5b91m0000gn/T/phantomas/fa78c9be-1ece-4c02-8cae-c564b1cb782b/ +2ms
phantomas:engines Engine "webkit": PhantomJS v1.9.8 installed in /Users/stefan/Sites/grunt-phantomas/node_modules/phantomjs/lib/phantom/bin/phantomjs +2ms
phantomas:engines Engine "webkit2": PhantomJS v2.0.0 installed in /Users/stefan/Sites/grunt-phantomas/node_modules/phantomjs2/lib/phantom/bin/phantomjs +4ms
var commentBox = document.querySelector( '[name="comment[body]"]' );
commentBox.value = '## QA Description\n\n' +
'## Legend: \n' +
' - :white_check_mark: QA Passed\n' +
' - :red_circle: QA fail\n' +
' - :question: QA needs more info\n' +
' - :green_heart: Dev fixed it after QA fail \n\n' +
'## Checklist: \n\n' +
' - Feature A\n' +
@stefanjudis
stefanjudis / phantomas.js
Created September 2, 2014 11:54
phantomas.js
/**
* grunt-phantoms configuration
*
* https://www.npmjs.org/package/grunt-phantomas
*/
'use strict';
module.exports = function() {
return {
@stefanjudis
stefanjudis / new_gist_file_0
Created August 18, 2014 13:12
simon slider kick off.
if ( $( '[data-orbit]' ).length ) {
$document.foundation( {
orbit : {
bullets : false
}
} );
}
@stefanjudis
stefanjudis / casperjs.js
Created June 18, 2014 09:44
Go for it simon
/**
* grunt-casperjs configuration
*
* https://npmjs.org/package/grunt-casperjs
*/
'use strict';
module.exports = function () {
return {
@stefanjudis
stefanjudis / gist:9645099
Created March 19, 2014 16:07
seo frontend
<article class="content--seo--article active">
<h1 class="content--seo--headline js-toggle">Natue: suplementos, cosm&eacute;ticos, nutricosm&eacute;ticos, vitaminas e alimentos naturais para uma vida em equil&iacute;brio</h1>
<p class="content--seo--paragraph">Aqui voc&ecirc; encontra produtos com ingredientes naturais,&nbsp;<a href="http://www.natue.com.br/cosmeticos/">cosm&eacute;ticos naturais</a>, alimentos e suplementos que auxiliam na conquista de uma vida mais saud&aacute;vel, onde equilibramos o nosso lado pessoal e profissional.</p>
<p class="content--seo--paragraph">Suplementos e produtos para todos os objetivos. No nosso diversificado e selecionado portf&oacute;lio voc&ecirc; encontra produtos naturais (das principais <a href="http://www.natue.com.br/todas-as-marcas/">marcas</a>, como&nbsp;<em><a href="http://www.natue.com.br/universal/">Universal</a>,&nbsp;Optimum,&nbsp;Nutrilatina,&nbsp;<a href="http://www.natue.com.br/sanavita/">Sanavita</a>,&nbsp;Sundown</em>, etc.) e complementos
var fancyApiKey;
casper.test.begin('curl_post_client', function suite ( test ) {
'use strict';
var url = "http://projecta:mate20mg@api-testing.e-sprinter.com.br/api/v1/client/";