Skip to content

Instantly share code, notes, and snippets.

View netdesignr's full-sized avatar
🎯
@(^-^)@

Mihai Diaconita netdesignr

🎯
@(^-^)@
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

Creating a two way sync between a Github repository and Subversion

Another git <> svn post?

As many of you know I have been on a quest to get Jetpack core development moved from the WordPress.org Subversion (svn) repository to Github (git). As part of this process I setup an experimental Jetpack repository to see how synchronization works between git and svn. Lets just clear the air right now and say not well, not well at all. This is due to how git and svn each store their respective histories. But! I think I finally have it figure out.

Backfill

I wrote an article a couple months ago entitled Creating a synchronized Github fork of a WordPress.org Subversion plugin repository. This article is great (and still a recommended read) if you are only doing synchronization b

@netdesignr
netdesignr / fsevents_unavailable.md
Last active November 21, 2018 15:03
Error: `fsevents` unavailable (this watcher can only be used on Darwin)

Error: fsevents unavailable (this watcher can only be used on Darwin)

I came accross this lovely error while I was trying to run my Jest tests. I belive the error is mainly because of the latest IOS Mojave.

Make sure you have brew installed

brew -v
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install watchman

Enjoy!

@netdesignr
netdesignr / jsbin.kororer.js
Last active October 17, 2018 12:47
Reverse Integer// source https://jsbin.com/kororer
/*
* Reverse Integer using Javascript ES6
* Built in JS methods: toString(), split(), reduce(), Math.sign()
*/
const reverseInt = (n, rev='', final) => {
final = n.toString().split('').reduce((acc, inv) => rev = inv + acc, '');
return parseInt(final) * Math.sign(n);
}
@netdesignr
netdesignr / README-Template.md
Created August 9, 2018 13:15 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@netdesignr
netdesignr / my-personal-wordpress-website-htacess-secure-patch-anti-hack.txt
Created June 16, 2018 20:07
My personal wordpress htaccess secure | patch | anti-hack 2018
## Find and replace ** yourdomain ** and add your desired domain name
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
@netdesignr
netdesignr / wordpress-plugin-svn-to-git.md
Created June 15, 2018 11:04 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@netdesignr
netdesignr / subversion-commands.txt
Last active June 14, 2018 15:18
Subversion commands
# Copy files
svn co https://plugins.svn.wordpress.org/plugin-name/trunk
# Copy files and create a new folder
svn co https://plugins.svn.wordpress.org/plugin-name/trunk < dirname >
@netdesignr
netdesignr / macos-terminal-commands.txt
Created June 14, 2018 15:12
MacOS Terminal Commands
# Create directory
mkdir < dirname >
# Remove directory
rm < dirname >
# Remove directory if it's not empty
sudo rm -r < dirname >