Skip to content

Instantly share code, notes, and snippets.

View optimbro's full-sized avatar
❄️
Github Premium for Devs

Rahul optimbro

❄️
Github Premium for Devs
View GitHub Profile
@optimbro
optimbro / wp-auto-login-single-user.php
Created December 5, 2022 15:58 — forked from faceonline/wp-auto-login-single-user.php
Automatically login a single WordPress user upon arrival to a specific page. Redirect to home page once logged in. Prevent viewing the login page. Tested with WP 3.9.1. Used in functions.php
<?php
//Automatically login a single WordPress user upon arrival to a specific page.
//Redirect to home page once logged in and prevent viewing of the login page.
//Tested with WP 3.9.1. Used in functions.php
//Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead."
//From http://tourkick.com/2014/wordpress-demo-multisite-db-reset/
function auto_login() {
//change these 2 items
$loginpageid = '1234'; //Page ID of your login page
@optimbro
optimbro / jailkit
Created June 25, 2019 20:12 — forked from psyray/jailkit
Jailkit for Debian Stretch (add PHP, Drush, Composer, NodeJS, NPM, Ruby, Gem, Compass)
[php]
comment = the php interpreter and libraries
executables = /usr/bin/php,/usr/bin/php5.6,/usr/bin/php7.0,/usr/bin/php7.1
directories = /usr/lib/php, /usr/share/php, /usr/share/php5, /etc/php, /usr/share/php-geshi, /usr/share/zoneinfo, /etc/snmp, /usr/share/snmp
includesections = env
[env]
comment = environment variables
executables = /usr/bin/env