Skip to content

Instantly share code, notes, and snippets.

View NSLog0's full-sized avatar
🦋

NSLog0 NSLog0

🦋
View GitHub Profile
@NSLog0
NSLog0 / 01_nginx.config
Created March 27, 2019 07:44 — forked from luisacarrion/01_nginx.config
AWS Elastic Beanstalk .ebextensions - custom location block
files:
"/etc/nginx/conf.d/01_proxy.conf":
mode: "000644"
owner: root
group: root
content: |
client_max_body_size 10M;
"/etc/nginx/conf.d/02_app_server.conf":
mode: "000644"
@NSLog0
NSLog0 / class_state.js
Last active November 12, 2018 06:34
Hooks API
import React from "react";
import ReactDOM from "react-dom";
class Hello extends React.Component {
constructor(props) {
super(props);
this.state = {
text: 'Hello, World!'
};
}
@NSLog0
NSLog0 / bouncing.css
Last active November 9, 2018 07:06
css3 article
@keyframes bouncing{
from {
bottom: 0;
box-shadow: 0 10px 10px rgba(0,0,0,0.6);
}
to {
bottom: 50px;
box-shadow: 0 100px 50px rgba(0,0,0,0.2);
}
@NSLog0
NSLog0 / ex1.js
Last active September 20, 2018 19:24
custom element article tutorail
class AppDrawer extends HTMLElement {...}
window.customElements.define('app-drawer', AppDrawer);
@NSLog0
NSLog0 / ATECC508A.md
Created September 16, 2018 07:25 — forked from bsodmike/ATECC508A.md
IoT Security with the Atmel ATECC508A

IoT Security with the Atmel ATECC508A

Get Public ECC Key
Key Number [0-15]
Public Key 15
PubKey:26712508A3544575F38526FA3D6AAAF920728A3ABDF2421841243F1961222944AF116DDFB4AF797EA70FCD09C9FEBC490793C271165410FAF3672BE5FD8D1B5D

Hash Data
Enter Message to hash: Thing Innovations Crypto
@NSLog0
NSLog0 / ex.md
Last active September 16, 2018 04:18
http-rest-tut-article
Resource GET (Read) POST (Create) PUT (update) DELETE (Delete)
/books ดึงข้อมูลหนังสือทั่งหมด สร้างหนังสือใหม่ อัพเดตข้อมูลหนังสือทั่งหมด ลบหนังสือทั่งหมด
books/2 /books/{:id} ดึงข้อมูลหนังสือตามไอดี ไม่อนุญาตให้เข้าถึง (HTTP 405) อัพเดตหนังสือตามไอดี ลบหนังสือตามไอดี
/books/authors ดึงข้อมูลผู้แต่งหนังสือทั่งหมด สร้างข้อมูลผู้แต่งหนังสือ อัพเดทข้อมูลผู้แต่งหนังสือทั่งหมด ลบผู้แต่งหนังสือทั่งหมด
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@NSLog0
NSLog0 / example.yml
Last active May 5, 2018 16:47
GitLab CI Service
stages:
- test
test_jpb:
stage: test
image: ruby:2.4.3
services:
- postgres:9.6.1
variables:
RAILS_ENV: test
@NSLog0
NSLog0 / ctags.setup
Created March 13, 2018 10:10 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@NSLog0
NSLog0 / eslint-with-prettier-config.md
Last active February 2, 2018 02:43
Config eslint with prettier for js and react