Skip to content

Instantly share code, notes, and snippets.

View vlrmprjct's full-sized avatar
🎹
Boing boom tschak!

Thomas vlrmprjct

🎹
Boing boom tschak!
View GitHub Profile
@vlrmprjct
vlrmprjct / vhost
Last active June 3, 2018 09:50 — forked from gistwebdev/vhost
Script to create apache2 virtual hosts #bash #linux #apache #wsl #host #vhost
#!/bin/bash
#
# Display usage info
vhost-usage() {
cat <<"USAGE"
Usage: vhost [OPTIONS] <name>
-h|--help this screen
-pub to create the webhost root in ~/www/name/public/
@vlrmprjct
vlrmprjct / Envy Code R Bold for Powerline.ttf
Created April 23, 2018 16:05
Envy Code R fonts patched for Powerline
@vlrmprjct
vlrmprjct / app.html
Created April 12, 2018 20:09 — forked from derekchiang/app.html
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
@vlrmprjct
vlrmprjct / package.json
Created March 11, 2018 11:05 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@vlrmprjct
vlrmprjct / composer.json
Created February 9, 2018 12:09 — forked from mfurlend/composer.json
composer require git repository
{
"name": "my_vendor_name/my_package",
"description": "My Package Description",
"license": "GPL-3.0",
"autoload": {
"classmap": [ // search these directories for classes
"lib/"
]
},
"repositories": {
@vlrmprjct
vlrmprjct / autoload.php
Last active November 13, 2017 07:51 — forked from cheich/autoload.php
PSR-4 class autoloader #php #class #autoloader
<?php
namespace MyProjectNamespace;
/**
* PSR-4 class autoloader
*
* @param string $class The fully-qualified class name.
*
* @return void
@vlrmprjct
vlrmprjct / pre-push.sh
Created October 23, 2017 07:00 — forked from vlucas/pre-push.sh
Prevent Pushes Directly to Master
#!/bin/bash
# @link https://gist.github.com/mattscilipoti/8424018
#
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
@vlrmprjct
vlrmprjct / sshKeyGen.sh
Last active November 8, 2017 08:11 — forked from wilcollins/sshKeyGen.sh
SSH KeyGen+Copy Bash Script (quick ssh key setup) #ssh #linux
#!/bin/bash
#
# Creates an SSH key on a client machine, applies the appropriate file permissions,
# copies to the local ~/.ssh directory, & copies to specified server
#
# parameters:
# ..1 newKeyFileName
# ..2 user@server
#
# usage :
@vlrmprjct
vlrmprjct / WP_secondary_editor.php
Last active November 8, 2017 08:18 — forked from dcondrey/WP_secondary_editor
Add a second TinyMCE editor to Wordpress post editor page. #php #wordpress
/* Second Post Editor TinyMCE Editor */
class SubContentEditor {
public $meta_key = 'subcontent';
public $meta_label = 'Right Side'; // Headline above editor
public $post_type = array( 'page' ); // The post type in which the editor should display
public $wpautop = true; // Automatically create paragraphs?
function __construct() {
add_action( 'edit_form_after_editor', array( &$this, 'edit_form_after_editor' ) );
@vlrmprjct
vlrmprjct / .htaccess
Created January 5, 2017 11:18 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/