This file contains 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
## | |
# Writes a CSV waveform.csv to local dir meant to import in a function generator. | |
# The wave is meant to be input in a highside bridge switching a coil to create a BEMF | |
# on every LOW (0). | |
# It merges several frequencies together by adding a LOW (trigger BEMF impulse) at the start of every | |
# cycle of included frequencies. Very much like swing seats you push only at the beggining of each cycle, | |
# each with a different period. | |
# Selected Frequencies are in line with the equation (Planck * ϕ ^ N) | |
## | |
## |
This file contains 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 java.util.Arrays; | |
/** | |
* Horse problem solved with my niece. | |
*/ | |
public class Caballo { | |
private static byte[][] tablero = new byte[][] | |
{{0, 0, 0, 0, 0, 0, 0, 0}, | |
{0, 0, 0, 0, 0, 0, 0, 0}, | |
{0, 0, 0, 0, 0, 0, 0, 0}, |
This file contains 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 lombok.AllArgsConstructor; | |
import org.junit.Test; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Executor; | |
import java.util.concurrent.ForkJoinPool; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicBoolean; |
This file contains 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
package com.mycompany; | |
/** | |
* Created by juanmf on 15/07/17. | |
*/ | |
import java.util.Arrays; | |
import java.util.stream.Collectors; | |
import org.apache.spark.api.java.*; | |
import org.apache.spark.SparkConf; |
This file contains 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
/** | |
* This script can be automatically triggered with IFTTT Stocks trigger and should | |
* be called with the following query string params: | |
* | |
* inputCurrency={{InputCurrency}} | |
* outputCurrency={{OutputCurrency}} | |
* exchangeRate={{ExchangeRate}} | |
* infoUrl={{InfoUrl}} | |
* checkTime={{CheckTime}} | |
* |
This file contains 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
/* | |
* The MIT License | |
* | |
* Copyright 2016 juan.fernandez. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains 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 java.util.Collections; | |
import java.util.Map; | |
import java.util.TreeMap; | |
/** | |
* Usage: | |
* | |
* Stopwatch.start("watchName"); | |
* ... |
This file contains 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 | |
namespace Application\ProcessBundle\Subscriber; | |
//Since Doctrine 2.4 | |
//use Doctrine\Common\Persistence\Event\LifecycleEventArgs; | |
//use Doctrine\Common\Persistence\Event\PreUpdateEventArgs; | |
use Symfony\Bridge\Monolog\Logger as SfLogger; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
This file contains 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
#The Config File | |
# The tool: https://github.com/juanmf/RedmineIssueImporter | |
#Use the following config file format to import sheets into redmine. So far it creates Issues, | |
#with custom fields, but it's extensible to add users, etc.. | |
################################################################################ | |
# Run customization |
This file contains 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
/** | |
* Recursive Prototype Clonner: | |
* it relies on the following data structure: | |
* <someAncestor data-allow-add="true"> ... | |
* <button class="" data-add="add" | |
* data-add-prototype-node="JQ selector relative to $button.closest('[data-allow-add]'). Will be parameter of $obj.find($selector)" | |
* data-add-prototype-name="<?php echo $prototypeName; ?> optional, defauts to __name__" | |
* data-add-append-node="%data-add-prototype-node% | JQ selector relative to $button.closest('[data-allow-add]'). | |
* Will be parameter of $obj.find($selector)" | |
* data-add-wrapper="html to wrap the cloned item before appending e.g. <li>__PROTOTYPE-CONTENT__</li>" |
NewerOlder