Skip to content

Instantly share code, notes, and snippets.

View kiramishima's full-sized avatar
🕹️
https://www.twitch.tv/kiramishima

Paul Arizpe kiramishima

🕹️
https://www.twitch.tv/kiramishima
View GitHub Profile
@kiramishima
kiramishima / tsconfig.json
Created November 21, 2018 00:14
Configuración de Typescript para trabajar con React
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5",
"jsx": "react"
},
"include": [
@kiramishima
kiramishima / webpack.config.js
Created November 21, 2018 19:50
Configuracion de Webpack
const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const SRC_PATH = path.join(__dirname, '../src');
module.exports = {
entry: "./src/App.tsx",
output: {
filename: "bundle.js",
path: path.join(__dirname, "../dist")
@kiramishima
kiramishima / HolaMundo.tsx
Created November 21, 2018 22:26
Componente HolaMundo
import * as React from 'react'; // Importamos React
export interface HolaProps { compiler: string; framework: string; }
// 'HolaProps' describe las props del componente.
// State nunca se establece por lo que usamos '{}'.
export class HolaMundo extends React.Component<HolaProps, {}> {
render() {
return <h1>Hola desde {this.props.compiler} y {this.props.framework}!</h1>;
}
@kiramishima
kiramishima / App.tsx
Created November 21, 2018 22:31
Entrypoint del componente
import * as React from 'react'; // Importamos React
import * as ReactDOM from 'react-dom'; // Importamos ReactDOM que es el que renderiza nuestro componente en el browser
import { HolaMundo } from './components/HolaMundo'; // Importamos nuestro componente HolaMundo
// Instanciamos nuestro componente y le decimos en que elemento sera renderizado, en este caso es un elemento con ID => root
ReactDOM.render(
<HolaMundo compiler="Typescript" framework="React" />,
document.getElementById("root")
);
@kiramishima
kiramishima / index.html
Created November 21, 2018 22:41
Template para Webpack
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<div id="root"></div>
@kiramishima
kiramishima / main.go
Created November 26, 2018 20:38
Ejemplo de Variables Compartidas
// mi-proyecto/main.go
package main
import "mi-proyecto/rutas"
import "mi-proyecto/rutas/software"
func main() {
rutas.Saludar()
software.Saludar2()
}
@kiramishima
kiramishima / home-page.xml
Last active February 19, 2019 22:04
Nativescript Fortnite Views App
<Page class="page"
navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd">
<ActionBar class="action-bar">
<Label class="action-bar-title" text="Home"></Label>
</ActionBar>
<StackLayout>
@kiramishima
kiramishima / stats-page.xml
Created February 19, 2019 22:12
Nativescript Fortnite Views App
<Page class="{{ bgclass }}"
navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd">
<ScrollView>
<StackLayout class="stacklayout_stats_page">
<Label text="{{ userStats.username }}" class="user_name" textWrap="true" />
<GridLayout columns="120, *" rows="auto, auto" class="gridlayout_stats_page">
<Label text="Epic ID" textWrap="true" class="info_label" col="0" row="0" />
<Label text="{{ userStats.uid }}" textWrap="true" class="info_value" col="1" row="0" />
<Label text="Platform" col="0" row="1" class="info_label" />
@kiramishima
kiramishima / app.css
Created February 19, 2019 22:55
Nativescript Fortnite Views App
/*
In NativeScript, the app.css file is where you place CSS rules that
you would like to apply to your entire application. Check out
http://docs.nativescript.org/ui/styling for a full list of the CSS
selectors and properties you can use to style UI components.
/*
In many cases you may want to use the NativeScript core theme instead
of writing your own CSS rules. For a full list of class names in the theme
refer to http://docs.nativescript.org/ui/theme.
@kiramishima
kiramishima / hello_world.py
Last active February 27, 2019 00:04
Ejemplo AWS Lambda
def lambda_handler(event, context):
print("Hola desde AWS Lambda")