π¨βπ»
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
// 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
// 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
# Force HTTPS | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
#HSTS | |
<IfModule mod_headers.c> | |
Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" | |
</IfModule> | |
# Block file listing |
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 Etiquetar ataques automaticamente. | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://pt50.tribalwars.com.pt/game.php?village=*&screen=overview_villages&mode=incomings&type=unignored&subtype=attacks* | |
// @match https://pt50.tribalwars.com.pt/game.php?village=*&screen=overview_villages&mode=incomings&action=process&type=unignored&subtype=attacks* | |
// @grant none | |
// ==/UserScript== |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 node | |
// make sure android platform is part of build | |
// if (ctx.opts.platforms.indexOf('android') < 0) { | |
// return; | |
// } | |
var fs = require('fs'); | |
var path = require('path'); | |
var exec = require('child_process').exec; |
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
Built-in Atom Packages (92) | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] | |
βββ [email protected] |
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
<?php | |
header('Content-Type: application/json'); | |
$files = glob('./imgs/*.jpg'); | |
foreach($files as &$file) { | |
$file = str_replace("./imgs/", "", $file); | |
} |
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
/** | |
* Randomize array element order in-place. | |
* Using Durstenfeld shuffle algorithm. | |
*/ | |
function shuffleArray(array) { | |
for (var i = array.length - 1; i > 0; i--) { | |
var j = Math.floor(Math.random() * (i + 1)); | |
var temp = array[i]; | |
array[i] = array[j]; | |
array[j] = temp; |