Skip to content

Instantly share code, notes, and snippets.

View TheBrown's full-sized avatar
🇦🇺

Saleumsack KEOBOUALAY TheBrown

🇦🇺
View GitHub Profile
const convertToLaoNumberString = (num, suffix) => {
"use strict";
if (typeof suffix === "undefined") {
suffix = "ຖ້ວນ";
}
num = num || 0;
num = num.toString().replace(/[, ]/g, ""); // remove commas, spaces
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Font
:set guifont=Source\ Code\ Pro:h14
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk
@TheBrown
TheBrown / docker-help.md
Created September 18, 2018 03:24 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@TheBrown
TheBrown / state.js
Created June 10, 2018 10:34
state example
import React, { Component } from 'react';
import { AppRegistry, Text, View } from 'react-native';
class Blink extends Component {
constructor(props) {
super(props);
this.state = {isShowingText: true};
// Toggle the state every second
setInterval(() => {
@TheBrown
TheBrown / index.js
Created June 10, 2018 10:07
props example
import React, { Component } from 'react';
import { AppRegistry, Image } from 'react-native';
export default class Bananas extends Component {
render() {
let pic = {
uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg'
};
return (
<Image source={pic} style={{width: 193, height: 110}}/>
@TheBrown
TheBrown / index.js
Created June 9, 2018 15:08
standalone tag
const element = <img src={user.avatarUrl} />;
const myElement = (
<div>
<h1>Sabaidee</h1>
<h2>hello newbie for JSX</h2>
</div>
);
@TheBrown
TheBrown / index.js
Created June 9, 2018 14:52
jsx in react.js
const name = 'saleumsack';
const element = <h1>Sabaidee {name}</h1>;
ReactDom.render(
element,
document.getElementById('root')
);
const myElement = <h1>Hello world from Laos!</h1>;
console.log('Hello boy!!');