Skip to content

Instantly share code, notes, and snippets.

@itbcodedev
itbcodedev / clsdocker.sh
Last active September 3, 2018 07:44
Deploy Angular 6 in Docker
#!/bin/bash
# Delete all <non>
docker system prune
# Delete all containers
docker system prune
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@itbcodedev
itbcodedev / getlocation.ino
Created September 8, 2018 10:21
Get Location
#include <WiFi.h>
const char* ssid = "kpciot";
const char* password = "kpciot@5635";
// Initialize the client library
WiFiClient client;
int status = WL_IDLE_STATUS;
char servername[]="ip-api.com"; // Google
@itbcodedev
itbcodedev / getlocationhttp.ino
Created September 9, 2018 03:46
Get location
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// Author Sawangpong Muadphet <itbakerydev@gmail.com>
// Komomi co ltd
// Description getLocation() sent Get() to ip-api.com/json
// to get ip information
// MIT License
#include <WiFi.h>
@itbcodedev
itbcodedev / process.txt
Created September 9, 2018 17:47
sphinx to github
1 create new repository and upload to github
$ mkdir komomi
$ git init .
$ touch README.md
$ git remote add origin url
$ touch .gitignore
2 create sphinx
$ pip3 install sphinx
$ mkdir docs
@itbcodedev
itbcodedev / vimsetup.txt
Created September 10, 2018 09:52
vim setup
install plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
ส่วน vimrc ไปเอาจาก
https://vim-bootstrap.com/
เพิ่ม
set mouse+=a
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --tern-completer' }
@itbcodedev
itbcodedev / openweather.ino
Created September 15, 2018 14:07
restful api esp
/*
This sketch sends data via HTTP GET requests to data.sparkfun.com service.
You need to get streamId and privateKey at data.sparkfun.com and paste them
below. Or just customize this script to talk to other HTTP servers.
*/
#include <ESP8266WiFi.h>
@itbcodedev
itbcodedev / MongoDB_macOS_Sierra.md
Created September 28, 2018 13:49 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@itbcodedev
itbcodedev / atom package
Last active November 10, 2018 15:55
Vim for nodejs developer
cd ~/.atom/packages/
apm install angularjs
apm install atom-beautify
apm install atom-path-intellisense
apm install autocomplete
apm install autocomplete-module-import
apm install autocomplete-modules
apm install autocomplete-paths
apm install autocomplete-plus
apm install busy-signal
@itbcodedev
itbcodedev / Install Vagrant Libvirt Fedora 27.md
Last active January 27, 2019 09:50 — forked from gangsta/Install Vagrant Libvirt Fedora 27.md
How to install Libvirt Vagrant on Fedora 27

How to Install Vagrant and Livbirt Fedora 27

Check for cpu Virtualization

lsmod | grep kvm
kvm_intel             167936  3
kvm                   499712  1 kvm_intel

Install

@itbcodedev
itbcodedev / vimrc
Last active April 5, 2019 16:03
vimrc with plug
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Necessary for cool features of vim
set nocompatible
" Sets how many lines of history VIM has to remember and undolevels
set history=9999
set undolevels=9999
" Enable syntax highlighting