π¨βπ»
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
// including plugins | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var minifyHtml = require('gulp-minify-html'); | |
var minifyCss = require('gulp-minify-css'); | |
var uglify = require('gulp-uglify'); | |
var runSequence = require('run-sequence'); | |
var clean = require('gulp-clean'); | |
var injectPartials = require('gulp-inject-partials'); | |
var imagemin = require('gulp-imagemin'); |
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
// https://medium.com/google-developer-experts/add-offline-support-to-any-web-app-c20edc4bea0e | |
gulp.task('sw', function(callback) { | |
var path = require('path'); | |
var swPrecache = require('sw-precache'); | |
var fs = require('fs'); | |
var rootDir = folder; | |
//var options = require('./sw-precache-config.json'); | |
var options = JSON.parse(fs.readFileSync('./sw-precache-config.json', 'utf-8')); | |
options.ignoreUrlParametersMatching = [/./]; |
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
// ==UserScript== | |
// @name Filter Mintos LO's | |
// @namespace http://tampermonkey.net/ | |
// @version 0.7 | |
// @description Filter Mintos LO's that offer "Interest income on delayed payments" | |
// @author Rodrigo GraΓ§a | |
// @match https://www.mintos.com/en/invest-en/primary-market/* | |
// @grant none | |
// @updateURL https://gist.githubusercontent.com/rodrigograca31/5f632bbaac2bab849435707eea532911/raw/filter_los.js | |
// @downloadURL https://gist.githubusercontent.com/rodrigograca31/5f632bbaac2bab849435707eea532911/raw/filter_los.js |
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
const person = { | |
name: 'Rodrigo', | |
age: 99, | |
how_old: function() { return this.name + ' is ' + this.age + ' old'} | |
} | |
person.how_old() | |
// Why dont arrow functions work with this? | |
// How do you solve it? | |
const person2 = { |
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
props.setMembers([ | |
...props.members.map((el, index) => { | |
if (el.id == props.editThisOne.id) { | |
el = member; | |
} | |
return el; | |
}) | |
]); | |
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
#!/usr/bin/env python3 | |
phrase = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer non lorem nec ante commodo gravida. Aenean ut ultricies quam. Nullam euismod lorem quis dapibus pharetra. Vestibulum a tincidunt justo. Proin eget faucibus velit. Aenean tincidunt lorem non ex molestie gravida vitae feugiat diam. In venenatis lacus non ipsum convallis porttitor nec vitae erat. Proin auctor, nibh ac hendrerit tempor, arcu lacus interdum erat, sit amet hendrerit mi dolor nec sapien. Maecenas mi dui, viverra ac imperdiet et, auctor id libero. Nunc sit amet felis lacus. Nunc vitae erat sit amet nunc porttitor lacinia vitae nec neque. Praesent tortor diam, molestie volutpat rhoncus et, fermentum a odio. Etiam et felis eget purus semper fermentum. In finibus ex in convallis pellentesque. Praesent fringilla massa ac dictum malesuada. Maecenas nec massa vitae mi porta sodales. Aenean blandit massa vitae leo finibus venenatis. In hac habitasse platea dictumst. Suspendisse eget orci ultrices justo malesua |
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
import time | |
times = 5000000 | |
def func1(): | |
return 5 + 5 | |
def func2(): | |
return 5 + 5 - 5 + 5 |
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
describe('CompanyPage', () => { | |
it('renders correctly', () => { | |
expect( | |
renderWithProviders( | |
withRouter( | |
<CompanyPage companies={testCompanies} avgSalaries={testSalaries} /> | |
) | |
).baseElement | |
).toMatchSnapshot(); | |
}); |
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
/** | |
* Generates a random integer between min and max (inclusive) | |
* @param {number} min | |
* @param {number} max | |
* @returns randomly generated integer | |
*/ | |
public randomInt = (min: number, max: number): number => { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
}; |
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
/** | |
* Makes a copy of values not references and goes down the attributes | |
*/ | |
deepCopy(o) { | |
var copy = o, | |
k; | |
if (o && typeof o === "object") { | |
copy = | |
Object.prototype.toString.call(o) === "[object Array]" |