Skip to content

Instantly share code, notes, and snippets.

View drblue's full-sized avatar
🔥
All Your Memes Are Belong To Me

Johan Nordström drblue

🔥
All Your Memes Are Belong To Me
View GitHub Profile
@drblue
drblue / wp-default.css
Last active April 3, 2017 11:14
WordPress Default Styles
/* Alignment */
.alignleft {
display: inline;
float: left;
margin-right: 1.5em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.5em;
@drblue
drblue / bootstrap.php
Created May 15, 2017 13:57
Eloquent ORM
<?php
require "vendor/autoload.php";
require "config.php";
use Illuminate\Database\Capsule\Manager as Capsule;
$capsule = new Capsule;
$capsule->addConnection([
<html>
<head>
<title>Fun with JS!</title>
</head>
<body>
<h1>Fun with JS!</h1>
<div id="container">
<?php
if (is_user_logged_in()) {
$user = wp_get_current_user();
echo "You are logged in as {$user->user_email}! <a href=\"/wp-login.php?action=logout\">Logout?</a>";
}
?>
<div class="jumbotron jumbotron-fluid bg-dark text-white">
<div class="container">
<h1 class="display-4">Fluid jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
</div>
</div>
@drblue
drblue / sphp.sh
Created April 28, 2019 21:31 — forked from rhukster/sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3")
php_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
valet_support_php_version_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
php_installed_array=()
php_version="php@$1"
@drblue
drblue / class.StarWarsWidget.php
Created May 22, 2019 13:02
Empty StarWars Widget
<?php
/**
* Adds StarWarsWidget widget.
*/
class StarWarsWidget extends WP_Widget {
/**
* Register widget with WordPress.

Keybase proof

I hereby claim:

  • I am drblue on github.
  • I am dr_blue (https://keybase.io/dr_blue) on keybase.
  • I have a public key ASCKkpIa863N8bf1ZF_o_gLedB3ii5VYUhnRkFZ5fgzqOgo

To claim this, I am signing this object:

<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@drblue
drblue / events.js
Created April 6, 2020 15:12
node.js event emitter demo (es6)
/**
* events
*/
const events = require('events');
class Person extends events.EventEmitter{
constructor(name){
super();
this.name = name;
}