Skip to content

Instantly share code, notes, and snippets.

@newloong
newloong / private_fork.md
Created September 21, 2023 03:02 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@newloong
newloong / README.md
Created March 26, 2022 08:45 — forked from kayintveen/README.md
Local Magento2 Development on Mac OS X Catalina and Mojave. Solving FD_SETSIZE Max processes and Max file descriptior issues.

Local Magento2 development on Mac OS X Catalina

Added the document to Medium and expanded it a bit with more configuration examples:

https://medium.com/@k.veen/setup-a-local-php-development-environment-on-mac-catalina-for-laravel-and-magento-2-development-3d7f1c587d86

After a lot of headace and sturggle i went back to what i trust. no more Laravelt Valet or Valet-plus or any other wrappers and workarounds. Sure a few things like enabling and disabling Xdebug is a tad bit more work. but its matter of seconds.

@newloong
newloong / readme.md
Created June 4, 2021 09:11 — forked from geoffyuen/readme.md
Import CSV into ACF Repeater (Wordpress)
@newloong
newloong / ufw.md
Created September 29, 2019 03:56 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@newloong
newloong / TorPrivoxyPython.md
Created August 23, 2019 03:09 — forked from DusanMadar/TorPrivoxyPython.md
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04. Alternatively, you can simply run docker run -it ubuntu:18.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

This guide is basically a compilation of all the resources listed below.

<?php
/**
* Sets up the Easy Post API Endpoints
*
* @package WP Theming
*/
/**
* Sets up a JSON endpoint at /wp-json/easy-post/v1/rates/
@newloong
newloong / numeric-page-navi.php
Created April 14, 2019 04:35 — forked from kennyeliason/numeric-page-navi.php
Numeric Page Navigation for Roots Sage Theme
// Numeric Page Navi
function page_navi($before = '', $after = '')
{
global $wpdb, $wp_query;
$request = $wp_query->request;
$posts_per_page = intval(get_query_var('posts_per_page'));
$paged = intval(get_query_var('paged'));
$numposts = $wp_query->found_posts;
$max_page = $wp_query->max_num_pages;
if ($numposts <= $posts_per_page) {return;}
@newloong
newloong / wp-bootstrap4.1-pagination.php
Created April 14, 2019 04:35 — forked from mtx-z/wp-bootstrap4.4-pagination.php
Wordpress Bootstrap 4.1 pagination (with custom WP_Query() and global $wp_query support)
<?php
/**
* @param WP_Query|null $wp_query
* @param bool $echo
*
* @return string
* Accepts a WP_Query instance to build pagination (for custom wp_query()),
* or nothing to use the current global $wp_query (eg: taxonomy term page)
* - Tested on WP 4.9.5
@newloong
newloong / Development.md
Created April 8, 2019 03:37 — forked from bfintal/Development.md
Creating a Custom Client WordPress Website from A PSD Design - A Gambit Technologies, Inc. Developer Guide

Creating a Custom Client WordPress Website from A PSD Design

(This is a Gambit Technologies, Inc. Developer Guide)

Development of a website from scratch is done by:

  1. Creating a customized WordPress theme using Sage by Roots,
  2. Creating the pages then creating the content either using a page builder, or by adding pure HTML content, then adding styles into the customized theme,
  3. Installing plugins from the WordPress plugin directory for added functionality, configuring them and customizing their styles.

We will use the following tools/projects/code bases:

@newloong
newloong / gist:a195854deeca50831daa553c1347f477
Created April 3, 2019 07:54 — forked from AliMD/gist:3865955
Create A Somple Product Catalog width Wordpress.

ali.md/pcwp

Step One: Create the custom post type

The following code goes into the functions.php file:

// Create A Somple Product Catalog width Wordpress. ali.md/pcwp
// Step One: Create the custom post type