View blackscholes.js
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
/* | |
PutCallFlag: Either "put" or "call" | |
S: Stock Price | |
X: Strike Price | |
T: Time to expiration (in years) | |
r: Risk-free rate | |
v: Volatility | |
This is the same one found in http://www.espenhaug.com/black_scholes.html | |
but written with proper indentation and a === instead of == because it's |
View gist:8f4553ca4297d0c3cd73770f7fdc351b
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
https://react-select.com/async - official docs | |
https://github.com/apollographql/apollo-client/issues/5268 - working with apollo | |
https://codesandbox.io/s/react-select-with-uselazequery-5bkpt?file=/src/index.js - select + useLazyQuery example | |
https://codesandbox.io/s/98vxxr18zw?file=/example.js - async debouce example | |
https://stackoverflow.com/questions/52695414/react-select-with-react-apollo-does-not-work - async + apollo client |
View one-line-bash-renamer
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
for file in $(find . -name "*.css"); do mv ${file} ${file%.css}.scss; done |
View gist:dcacedcf8224b9db0a4280b3d397c697
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
var sitesList = [ | |
["http://heeeeeeeey.com/"], | |
["http://tinytuba.com/"], | |
["http://corndog.io/"], | |
["http://thatsthefinger.com/"], | |
["http://cant-not-tweet-this.com/"], | |
["http://weirdorconfusing.com/"], | |
["https://www.eyes-only.net/"], | |
["http://eelslap.com/"], | |
["http://www.staggeringbeauty.com/"], |
View send-email.php
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 | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\SMTP; | |
require '../vendor/autoload.php'; | |
function sendemail($para, $nombre, $cuerpo, $asunto) { | |
$mail = new PHPMailer; | |
$mail->isSMTP(); | |
$mail->SMTPDebug = 2; | |
$mail->Host = 'smtp.gmail.com'; |
View class.txt
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
https://hangouts.google.com/call/K64mlXsN49eYCsQOPiPzAAEE |
View clase04_html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Clase 4</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
<nav> | |
<ul> |
View aerodynamic.rb
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
use_bpm 123 | |
maquillage = "~/Samples/il-macquillage-lady.wav" | |
aerodynamic = "~/Samples/funk.wav" | |
load_sample maquillage | |
load_sample aerodynamic | |
define :sample_chunk do |what, beat, dur, delay| | |
beat = beat / 16.0 |
View using_images.php
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 | |
// could be useful http://stackoverflow.com/questions/16774521/scale-image-using-php-and-maintaining-aspect-ratio | |
// El archivo | |
$nombre_archivo = 'inverco-sa'; | |
$mime_type = '.png'; | |
// Create a 210x210 image | |
$im = imagecreatetruecolor(210, 210); | |
$white = imagecolorallocate($im, 255, 255, 255); |
View memory_limit_usage_percent.php
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 | |
$memory_limit = (int)trim(ini_get("memory_limit"),'M'); | |
function echo_memory_usage() { | |
$mem_usage = memory_get_usage(true); | |
if ($mem_usage < 1024) | |
echo $mem_usage." bytes"; | |
elseif ($mem_usage < 1048576) { | |
echo "memory usage: ".round($mem_usage/1024,2)." kilobytes"."<br>"; | |
echo "percent usage:".round((($mem_usage/1024) * 100 / ($GLOBALS['memory_limit'] * 1024)),2)."%"."<br>"; | |
} |
NewerOlder