Skip to content

Instantly share code, notes, and snippets.

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

webface webface

:octocat:
Focusing
View GitHub Profile
<?php
/*
Plugin Name: Custom Taxonomy DropDown
Author: Hameedullah Khan
Aurhot URI: http://hameedullah.com
*/
// change this to your taxonomy
$brand_taxonomy = 'category';
@webface
webface / WordPress Development .gitignore
Created July 25, 2019 01:30 — forked from ixrevo/WordPress Development .gitignore
.gitignore file for setting up the WordPress development environment.
########################
# Wordpress Core files #
########################
wp-admin/
wp-content/backups/
wp-content/blogs.dir/
wp-content/languages/
wp-content/index.php
wp-content/themes/index.php
wp-includes/
@webface
webface / react-file-upload.js
Created August 18, 2019 20:00 — forked from AshikNesin/react-file-upload.js
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@webface
webface / vhost.py
Created September 24, 2019 02:56 — forked from fideloper/vhost.py
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@webface
webface / gist:7a1c49723e71a474d500a5eb680b18a0
Created October 6, 2019 13:40 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@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'
@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 / 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 / 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