Skip to content

Instantly share code, notes, and snippets.

View webface's full-sized avatar
:octocat:
Focusing

webface webface

:octocat:
Focusing
View GitHub Profile
@webface
webface / tinymce-react-nextjs.md
Created April 28, 2021 16:47 — forked from zhangshine/tinymce-react-nextjs.md
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@webface
webface / custom.conf
Created April 11, 2021 20:49 — forked from kalepail/custom.conf
My custom mechanic.conf template for rolling deployments on Meteor
{# Let folks know this wasn't a manual configuration #}
# This configuration file was generated with mechanic.
{% macro server(site, settings, options) %}
include "{{ settings.overrides }}/{{ site.shortname }}/top";
server {
gzip on;
@webface
webface / App.tsx
Created December 20, 2020 02:42 — forked from rinturj84/App.tsx
Meteor - React-router Authentication for Routes.
import React from 'react';
import LoginForm from './components/login/LoginForm';
import { Router, Switch, Route } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import AuthenticatedRoute from './authentication/AuthenticatedRoute';
import Desk from './components/desk/Desk';
export const App = () => {
const logout = () => Meteor.logout();
const history = createBrowserHistory();
@webface
webface / docker_wordpress.md
Created July 26, 2020 15:33 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@webface
webface / useRequestHandler.js
Created April 16, 2020 17:09 — forked from tombuyse/useRequestHandler.js
React hook useRequestHandler
import {useState} from 'react';
const useRequestHandler = () => {
const [isLoading, setLoading] = useState(false);
const [hasError, setError] = useState(false);
const [data, setData] = useState(null);
const handleRequest = (request) => {
setLoading(true);
setError(false);
@webface
webface / useRequestHandler.js
Created April 16, 2020 17:09 — forked from tombuyse/useRequestHandler.js
React hook useRequestHandler
import {useState} from 'react';
const useRequestHandler = () => {
const [isLoading, setLoading] = useState(false);
const [hasError, setError] = useState(false);
const [data, setData] = useState(null);
const handleRequest = (request) => {
setLoading(true);
setError(false);
@webface
webface / nodejs-cheatsheet.js
Created February 25, 2020 13:44 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@webface
webface / mongo-create-user.js
Created December 26, 2019 16:46 — forked from foull/mongo-create-user.js
NodeJS - MongoDB - creating new user with admin privileges
var MongoClient = require('mongodb').MongoClient
//
// config
//
var mongoPort = '27017'
var mongoHost = 'localhost'
var dbName = 'dbName'