Solido boilerplate
- Listen for .sol changes
- Compile
- Compile ABI export
- Hot reload webpack
Solido boilerplate
package com.sigag.scheduler.jobs; | |
import io.reactivex.Observable; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import java.math.BigDecimal; | |
import java.text.DateFormat; |
# Call REST API | |
$SecurePassword = Get-Content httpbin_creds.txt | ConvertTo-SecureString -Key (1..16) | |
$Username = "johnlopez" | |
$cred = New-Object System.Management.Automation.PSCredential ($Username, $SecurePassword) | |
Invoke-RestMethod -Uri "http://httpbin.org/basic-auth/$Username/password123456789" ` | |
-Method Get -Credential $cred -ContentType "application/json" -Body $json |
# Write secure string as file | |
Write-Output "Ingrese contraseña: " | |
$Secure = Read-Host -AsSecureString | |
$Encrypted = ConvertFrom-SecureString -SecureString $Secure -Key (1..16) | |
$Encrypted | Set-Content httpbin_creds.txt | |
$Secure2 = Get-Content httpbin_creds.txt | ConvertTo-SecureString -Key (1..16) | |
$Secure2 | |
Write-Output "Archivo encriptado como httpbin_creds.txt exitosamente" |
private String createBearerToken() throws Exception { | |
byte[] decoded = ("-----BEGIN RSA PRIVATE KEY-----\n" + | |
"-----END RSA PRIVATE KEY-----\n").getBytes(); | |
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); | |
PEMParser pemParser = new PEMParser(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(decoded)))); | |
JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); | |
Object object = pemParser.readObject(); | |
KeyPair kp = converter.getKeyPair((PEMKeyPair) object); | |
java.security.interfaces.RSAPrivateKey generatedPvk = (java.security.interfaces.RSAPrivateKey)kp.getPrivate(); |
const bot$ = Rx.Observable.from(request(postReq)); | |
bot$.mergeMap((body) => { | |
const byCedulaResp = menio.parse(body, 'subscribers'); | |
const req = Object.assign({}, postReq, { | |
form: { | |
selectsuscriptor: byCedulaResp.subs[0], | |
} | |
}); | |
return Rx.Observable.from(request(req)); | |
}) |
context: 'td', | |
props: { | |
tipo: function ($scope) { | |
// either return or assign to this.model | |
return $scope.eq(0).text(); | |
}, | |
fecha: function ($scope) { | |
return $scope.eq(1).text(); | |
} | |
<!-- parcialmente basado en yearofmoo.com --> | |
<form name="formulario"> | |
<div class="field"> | |
<label for="correo">Correo Electronico:</label> | |
<input type="email" | |
name="correo" ng-change="MiCtrl.checkRequired(datos.email)" ng-blur="MiCtrl.checkRequired(datos.email)" | |
ng-model="datos.email" | |
/> | |
<div ng-messages="formulario.correo.$error"> | |
<div ng-message="required">Campo requerido</div> |