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"
import argparse
import io
import time
import numpy as np
from edgetpu.detection.engine import DetectionEngine
import cv2
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
import React from 'react'
import PropTypes from 'prop-types'
import { get, mapKeys, snakeCase, omitBy } from 'lodash'
import className from 'classnames'
import { connect } from 'react-redux'
import moment from 'moment'
import {
getProject,
loadProject,
import * as R from 'ramda'
const EN_MESSAGE = 'Our website is under renovate, please be patient. We\'ll be back soon'
const TH_MESSAGE = 'กำลังปรับปรุงเว็บใหม่'
const lang = 'en'
const showMessage = R.ifElse(
R.propEq('lang', 'en'),
() => EN_MESSAGE,
() => TH_MESSAGE,
);
@NSLog0
NSLog0 / rest-ex.md
Last active February 1, 2020 17:28

| Resource |GET (Read) | POST (Create) | PUT (Bulk update) |PATCH (Update)| |DELETE (Delete)| |---|---|---|---|---|---| |/books| Return a list of books| Creates a new book|Bulk update|Delete all| |books/2|Return a sprecific book| Method not allowed (HTTP 405)| Updates a specific user| Deletes a specific user|

@NSLog0
NSLog0 / dna1.ipynb
Last active April 28, 2020 19:44
DNA Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NSLog0
NSLog0 / python.38.Dockerfile
Created October 25, 2020 14:01
Dockerfile for python 3.8 image fork
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM buildpack-deps:buster
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH
const priceValidator = ({
products = [],
tax = 0,
deliveryFee = 0,
limitDeliveryFee = 0,
pointToDiscount = 0,
pointToDiscountRate = 10
}: IPriceValidator) => {
const PRICE_OFFSET = 100
class INotification
def send
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
def body
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
end