Skip to content

Instantly share code, notes, and snippets.

View SastraNababan's full-sized avatar
😀

Sastra Nababan SastraNababan

😀
  • Indonesia
View GitHub Profile
{
"name": "pixel-2-components",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>codesandbox</title>
</head>
<body>
import Vue from 'vue'
import App from './App.vue'
import Pixel, { ThemeProvider, MpReset } from '@mekari/pixel'
Vue.use(Pixel)
new Vue({
render: (h) => h(ThemeProvider, [h(MpReset), h(App)])
}).$mount('#app')
@SastraNababan
SastraNababan / README.txt
Created June 8, 2021 13:32
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
// ============== Scope & Hoisting =============
/*
// global scope
{
// local scope
}
*/
console.log("_______________________");
@SastraNababan
SastraNababan / feeds.opml
Last active September 2, 2018 02:25 — forked from jvns/feeds.opml
Programming Blogs Feeds Collection
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Julia subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="tech" title="tech">
<outline type="rss" text="Latest - kate losse" title="Latest - kate losse" xmlUrl="http://www.katelosse.tv/latest?format=rss" htmlUrl="http://www.katelosse.tv/latest/"/>
<outline type="rss" text="Counting From Zero" title="Counting From Zero" xmlUrl="http://blogs.whitman.edu/countingfromzero/feed/" htmlUrl="http://blogs.whitman.edu/countingfromzero"/>

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@SastraNababan
SastraNababan / propCallback.js
Last active December 2, 2018 10:01
Prop Callback
export default class Parent extends Component {
state={
status:true
}
_changeStatus=(status)=>{
this.setState({status:status})
}
render() {
return (
<Child
@SastraNababan
SastraNababan / propsVSstate.csv
Last active March 11, 2018 02:46
Props vs State
house leader
keong foo bar
@SastraNababan
SastraNababan / Counter.js
Created March 11, 2018 01:14
Counter Component State
class Counter extends React.Component{
// #1 inisialisasi state
state={
value :0
}
// #2 method untuk merubah state
minus=()=>{
let currentValue=this.state.value
this.setState({ value : currentValue - 1 })