Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Goodbye new FB ads
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove facebook ads
// @author Maurizio Carboni
// @match https://www.facebook.com/*
// @grant none
// ==/UserScript==
@maury91
maury91 / index.html
Last active October 5, 2016 07:48 — forked from d3noob/.block
Simple vertical d3.js tree diagram
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
cursor: pointer;
}
.node circle {
fill: #fff;
//Paste this script on the console
//Config var, change this var at runtime to change the message
var autoMessage = prompt('Message to send');
//Support var
var isActive = false;
//Check every 200ms if the status of the textarea is changed
setInterval(function() {
var isActiveNow = !document.querySelector('textarea.chatmsg').disabled;
//If the textarea was previously disabled and now is enabled, means that we are meeting a new stranger
//And obviously check if we have a message to send
import fs from 'fs';
import readline from 'readline';
const words = {};
const wordReader = readline.createInterface({
input: fs.createReadStream('words.italian.txt','utf8')
});
wordReader.on('line',( word ) => {
if ( word.length ) {
const blackCharacter = '#';
export function getStructure( matrix ) {
const lineLength = matrix.length && matrix[0].length;
const dictionary = [];
for ( let i=0; i<matrix.length; i++) {
for ( let j=0; j<lineLength; j++ ) {
// Horizontal
if ( j==0 || matrix[i][j-1] === blackCharacter && matrix[i][j] !== blackCharacter ) {
let a=j;
export function fillBlanks( { index=0, structure, matrix, words }) {
const { col , row, length, horizontal } = structure[index];
const spaceStatus = getSpaceStatus({ matrix, length, col, row, horizontal });
const validWords = getPossibleWords({ words : words[length], spaceStatus });
if ( validWords.length ) {
return tryAllWords({ validWords, words, structure, index : index+1, matrix, col , row, length, horizontal });
}
return 0;
}
**********
*#*#*##*##
**********
*#*#*##*##
**********
*#*#*##*##
**********
*#*#*##*##
*#********
*#*#*##*##