Skip to content

Instantly share code, notes, and snippets.

View thom4parisot's full-sized avatar

Thomas Parisot thom4parisot

View GitHub Profile
@thom4parisot
thom4parisot / Gulpfile.js
Last active September 22, 2020 11:43
gulp -> npm scripts only
'use strict';
var pkg = require('./package.json');
var gulp = require('gulp');
var utils = require('gulp-util');
var source = require('vinyl-source-stream');
var isWatching = false;
var isProduction = process.env.NODE_ENV === 'production';
@thom4parisot
thom4parisot / _gradients.css.scss
Last active July 10, 2020 14:18 — forked from thbar/_gradients.css.scss
Horizontal Gradient Sass Mixin
@mixin horizontal-gradient($from, $to, $stop: 100%) {
/* fallback/image non-cover color */
background-color: $from;
/* Firefox 3.6+ */
background-image: -moz-linear-gradient(left, $from 0%, $to $stop);
/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, $from), color-stop($stop, $to));
class Invoker {
invoke() {
return Invoker.convertFromStdin()
}
static async convertFromStdin() {
console.log('>>> convertFromStdin')
const data = await Invoker.readFromStdin()
console.log('<<< convertFromStdin', data)
}
@thom4parisot
thom4parisot / after-fonctionnel.js
Last active May 20, 2018 12:40
loops-refactoring
const variables = []
function isDuplicate(program, index, programs) {
return programs.slice(i+1).contains(p => {
return p.program.genrePressCode !== program.program.genrePresseCode
})
}
function mapProgram({language, idChannel}) {
return (program) => ({
// 'use strict';
a = 32
printA()
function printA() {
console.log(a)
}
a = 64
@thom4parisot
thom4parisot / README.md
Last active May 2, 2018 20:01
npm config + ENV variables

Keybase proof

I hereby claim:

  • I am oncletom on github.
  • I am oncletom (https://keybase.io/oncletom) on keybase.
  • I have a public key ASDuZSGubIkd5hTeiDzH25-afDvVZ28OOyGUAR2v_Zo-mgo

To claim this, I am signing this object:

@thom4parisot
thom4parisot / casper-dump-headers.js
Created July 17, 2012 13:58
Dump Response Headers with CasperJS
var casper = require('casper').create();
casper.start();
casper.open('http://borisschapira.com/');
casper.then(function dumpHeaders(){
this.currentResponse.headers.forEach(function(header){
console.log(header.name +': '+ header.value);
});
});
@thom4parisot
thom4parisot / freshbooks-invoice-total-hours.js
Created October 18, 2012 07:30
Freshbooks Invoice Total Hours
$('.invbody-items:first tbody tr').map(function(){
return parseInt($(this).find('td:eq(3)').text().trim(), 10);
}).get().reduce(function(left, right){
return (left || 0) + (right || 0);
}); // total hours as a number
@thom4parisot
thom4parisot / README.md
Last active December 4, 2017 02:46
Downloading daily archives of an Instagram Hashtag.

Instagram Hashtag Archiver

This script helps you to download locally the latest pictures related to a specific Instagram hashtag. It will fetch them and add them in a daily folder (like 2013-8-16 for the 16th of August 2013).

No resume feature. No extra metadata. No OAuth pain.

Install