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 { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
// Sustituye este enlace por el que devuelve el despliegue de tu aplicación | |
// con arkb | |
const fileService = "https://arweave.net/RhfPbeXFU3ieGVS5qALEnrIqeHNyeOiYnnVsmI04pPg"; | |
async function reqHanlder( req: Request ) { | |
let path = new URL(req.url).pathname; | |
if( path === '/faq' ){ | |
path = '/'; |
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
''' | |
v0.2 Not sell or buy twice the same level over/under the price | |
''' | |
import math | |
def initialize(state): | |
state.number_offset_trades = 0 | |
# 50 BUSD every time | |
buy_value = 50 |
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
const slsw = require('serverless-webpack'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const analyzer = new BundleAnalyzerPlugin({ | |
analyzerMode: 'static', | |
openAnalyzer: false, | |
generateStatsFile: true | |
}); | |
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
/** | |
* Animated works by building a directed acyclic graph of dependencies | |
* transparently when you render your Animated components. | |
* | |
* new Animated.Value(0) | |
* .interpolate() .interpolate() new Animated.Value(1) | |
* opacity translateY scale | |
* style transform | |
* View#234 style | |
* View#123 |
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
const Clean = require('clean-webpack-plugin') | |
// ... | |
{ | |
// ... | |
plugins: [ | |
new Clean('build/*.*', {/* options */}) | |
] | |
// ... | |
} |
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 Copy = require('copy-webpack-plugin'); | |
// ... | |
{ | |
// ... | |
plugins: [ | |
new Copy({ | |
from: 'assets/fonts', | |
to: 'fonts', // path relative to the build folder | |
toType: 'dir', // or 'file' | |
ignore: ['*.json'] // We can skip files |
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
const config = {} | |
if( process.env.NODE_ENV === 'production' ){ | |
config.remoteURL = 'http://myserver.com/resource'; | |
} | |
else { | |
config.remoteURL = 'http://localhost/resource'; | |
} | |
export default config; |
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 webpack = require("webpack"); | |
// ... | |
{ | |
// ... | |
plugins: [ | |
new webpack.DefinePlugin({ | |
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV) | |
}) | |
] | |
// ... |
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
git clone https://github.com/passpill-io/passpill-backend.git | |
cd passpill-backend | |
npm install | |
npm start |
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 helper will guide our websocket events to freezer | |
function toFreezer( socketEvent, freezerEvent ){ | |
socket.on( socketEvent, function(){ | |
var args = [freezerEvent].concat( Array.from(arguments) ); | |
freezer.emit.apply( freezer, args ); | |
}); | |
} | |
// Now we can redirect socket events easily | |
toFreezer('messageReceived', 'message:received'); |
NewerOlder