Skip to content

Instantly share code, notes, and snippets.

@adnoh
adnoh / install.sh
Created November 16, 2020 16:35 — forked from acusti/install.sh
WordPress install script using WP-CLI: supports Multisite, MAMP, local php.ini overrides, and theme and plugin scaffolding, and will generate optimized .gitignore and .htaccess files.
#!/bin/bash
# Install WordPress
# =================
# Based on many sources, but originally based on:
# @ http://premium.wpmudev.org/blog/set-up-wordpress-like-a-pro/
# See also: http://wprealm.com/blog/wordpress-wp-cli-kung-fu-made-simple/
# BEGIN Configuration
@adnoh
adnoh / MobyLinux.ps1
Created December 22, 2019 08:29 — forked from biggyspender/MobyLinux.ps1
Set DockerNAT switch to be a private network
# See comment lines prefixed with ADDED
# It might be necessary to delete the existing DockerNAT switch in hyper-v manager
<#
.SYNOPSIS
Manages a MobyLinux VM to run Linux Docker on Hyper-V
.DESCRIPTION
Creates/Destroys/Starts/Stops A MobyLinux VM to run Docker on Hyper-V
.PARAMETER VmName
@adnoh
adnoh / curl.sh
Created August 11, 2019 10:51 — forked from davimacedo/curl.sh
Example of importing data with cloud functions
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
@adnoh
adnoh / AwesomeStruct.cpp
Last active April 11, 2019 00:39 — forked from hanzochang/AwesomeStruct.cpp
[UE4(Unreal Engine 4)] Example for parsing json and creating struct instance from parsed json.
#include "AwesomeStruct.h"
//#include "ProcedualSpline.h"
FAwesomeStruct FAwesomeStruct::BuildAwesomeStruct(
FVector AwesomeVector,
bool AwesomeBoolean,
float AwesomeFloat,
int32 AwesomeInteger,
FRotator AwesomeRotator
)
@adnoh
adnoh / git-mv-with-history
Created April 2, 2019 08:22 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@adnoh
adnoh / VagrantMultipleMachineWorkspace.md
Created November 13, 2017 14:08 — forked from renoirb/VagrantMultipleMachineWorkspace.md
Using Vagrant with Salty-Vagrant and Multiple virtual machines

Description

Have you ever wanted to have a Vagrant workspace with more than one Virtual Machine, and managed by Salt Stack? I did, but the documentation is not all there yet.

I managed to make it work with the following, hope it will be useful.

To use

See the Complete salty-vagrant setup, but use the current Vagrantfile to have two machines.

@adnoh
adnoh / encrypted-git-repo.md
Created October 18, 2017 11:46
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@adnoh
adnoh / DownloadMixamoByLouisHong.js
Created November 17, 2016 12:00 — forked from TheLouisHong/DownloadMixamoByLouisHong.js
Downloads all the free Mixamo Animations
// Anonymous "self-invoking" function
alert("Thank you for using this script created by Louis Hong (/u/loolo78)\n\nThe download will now begin.");
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://code.jquery.com/jquery-latest.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
_.each(Router.routes, function(route){
console.log(route.getName());
});