Skip to content

Instantly share code, notes, and snippets.

View antosan's full-sized avatar

Antony Sande antosan

View GitHub Profile
@antosan
antosan / 2_webpack.config.js
Created April 27, 2019 13:05
react-webpack-demo
const path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "build"),
filename: "bundle.js"
},
module: {
rules: [
@antosan
antosan / 1_webpack.config.js
Created April 27, 2019 11:54
react-webpack-demo
const path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "build"),
filename: "bundle.js"
},
module: {
rules: [
@antosan
antosan / .babelrc
Created April 27, 2019 11:32
react-webpack-demo
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
@antosan
antosan / src_index.js
Last active April 27, 2019 12:06
react-webpack-demo
import React from "react";
import ReactDOM from "react-dom";
import App from "./App.jsx";
ReactDOM.render(<App />, document.getElementById("root"));
@antosan
antosan / src_App.jsx
Created April 27, 2019 10:39
react-webpack-demo
import React from "react";
class App extends React.Component {
render() {
return (
<div>
<p>Hello World from React</p>
</div>
);
}
@antosan
antosan / public_index.html
Created April 27, 2019 10:33
react-webpack-demo
<!DOCTYPE html>
<html lang="en">
<head>
<title>React</title>
</head>
<body>
<div id="root"></div>
<!DOCTYPE html>
<html lang="en">
<head>
<title>React</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
@antosan
antosan / exportSheetAsJSON.gs.js
Created March 13, 2019 04:19 — forked from IronistM/exportSheetAsJSON.gs.js
Google Sheet as JSON
// Credit Christian Boutin
function exportSheetAsJSON() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var numCols = rows.getNumColumns();
var values = rows.getValues();
var output = "";
output += "{\""+sheet.getName()+"\" : {\n";
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@antosan
antosan / Button.java
Last active March 11, 2019 11:22
RoboSapienX Controller
class Button {
int btnX;
int btnY;
int btnWidth;
int btnHeight;
color btnColor;
color btnHighlight;
String btnLabel;
Button(String tempLabel, int tempX, int tempY, int tempWidth, int tempHeight, color tempColor) {