Skip to content

Instantly share code, notes, and snippets.

View mcspx's full-sized avatar

@mcspx mcspx

  • M STACK CO.,LTD.
View GitHub Profile
@mcspx
mcspx / Laravel PHP7 LEMP AWS.md
Created June 9, 2017 17:35 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@mcspx
mcspx / python_opencv_camera_haar.py
Created November 4, 2017 04:29 — forked from radames/python_opencv_camera_haar.py
Example of Python with Opencv and camera face detection
import cv2
cap = cv2.VideoCapture(0)
cap.set(3, 640) #WIDTH
cap.set(4, 480) #HEIGHT
face_cascade = cv2.CascadeClassifier('/usr/local/Cellar/opencv/2.4.13/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('/usr/local/Cellar/opencv/2.4.13/share/OpenCV/haarcascades/haarcascade_eye.xml')
while(True):
@mcspx
mcspx / gps.hpp
Created January 5, 2018 17:45 — forked from nazt/gps.hpp
gps.hpp
#include <Arduino.h>
#include "gnss.h"
GNSS gps;
float GPS_SEARCH_TIMEOUT_S = 40;
extern uint8_t LED;
// volatile char GNSS_data[58] = "";
char GNSS_data[58] = "";
String gps_data = "";
@mcspx
mcspx / d3-js-calendar-heatmap.markdown
Created March 18, 2019 17:31
D3.js calendar heatmap

D3.js calendar heatmap

D3.js calendar heatmap representing time series data is used to visualize tracked time over the past year, showing details for each of the days on demand.

Includes visualization of year, month, week and day overview with zoom for details-on-demand.

Inspired by github's contribution graph.

For more info see https://github.com/g1eb/calendar-heatmap

@mcspx
mcspx / index.html
Created August 23, 2019 19:02
Toast Messages + Remove Animation
<div class="toast__container">
<div class="toast__cell">
<div class="toast toast--green">
<div class="toast__icon">
<svg version="1.1" class="toast__svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g><g><path d="M504.502,75.496c-9.997-9.998-26.205-9.998-36.204,0L161.594,382.203L43.702,264.311c-9.997-9.998-26.205-9.997-36.204,0 c-9.998,9.997-9.998,26.205,0,36.203l135.994,135.992c9.994,9.997,26.214,9.99,36.204,0L504.502,111.7 C514.5,101.703,514.499,85.494,504.502,75.496z"></path>
</g></g>
</svg>
</div>
<div class="toast__content">
@mcspx
mcspx / lazy-load-puppeteer.js
Created October 2, 2019 20:53 — forked from schnerd/lazy-load-puppeteer.js
Lazy-loading content in Puppeteer
function wait (ms) {
return new Promise(resolve => setTimeout(() => resolve(), ms));
}
export default async function capture(browser, url) {
// Load the specified page
const page = await browser.newPage();
await page.goto(url, {waitUntil: 'load'});
// Get the height of the rendered page
@mcspx
mcspx / golang-tls.md
Created October 7, 2019 18:20 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@mcspx
mcspx / golang-tls.md
Created October 10, 2019 02:17 — forked from 6174/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@mcspx
mcspx / index.haml
Created December 18, 2019 17:49
Rounded Hexagon Menu
%ul.menu
%li.active
%a.menu-handle
%div.menu-handle-container
%div.menu-handle-content
%i.menu-handle-hamburger ☰
%strong.menu-handle-icon
%i.fa.fa-home
%ul.sub-menu
%li.menu-item
@mcspx
mcspx / README.md
Created January 19, 2020 21:03 — forked from tissera/README.md
D3v4 Liquid Fill Gauge Chart with animations