Skip to content

Instantly share code, notes, and snippets.

View whatadewitt's full-sized avatar
👀
building baller ass shit

Luke DeWitt whatadewitt

👀
building baller ass shit
View GitHub Profile
const deck1 = [
14,
23,
6,
16,
46,
24,
13,
25,
17,
import React, { Component } from "react";
import { Route } from "react-router-dom";
import "./App.css";
import Link from "./Link";
import Home from "./Home";
import About from "./About";
import Topics from "./Topics";
class App extends Component {
componentDidMount() {
@whatadewitt
whatadewitt / .stylelintrc
Last active July 25, 2017 19:40
Initial Stylelint
{
"extends": "stylelint-config-standard",
"rules": {
"at-rule-no-vendor-prefix": true,
"at-rule-semicolon-space-before": "never",
"block-closing-brace-space-after": "always-single-line",
"color-named": "never",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-no-important": true,
"font-family-name-quotes": "always-unless-keyword",
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var routes = require('./routes/index');
@whatadewitt
whatadewitt / .bash_profile
Created May 16, 2013 20:17
my bash profile
# wp-cli
alias wp='~/git/wp-cli/bin/wp'
source ~/git/wp-cli/utils/wp-completion.bash
export WP_CLI_PHP=/Applications/MAMP/bin/php/php5.4.10/bin/php
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
# get git branch
@whatadewitt
whatadewitt / wp_admin_mode
Last active December 17, 2015 05:39
WP Maintenance Mode
// Temp Maintenance - with http response 503 (Service Temporarily Unavailable)
// This will only block users who are NOT an administrator from viewing the website.
function wp_maintenance_mode(){
if(!current_user_can('edit_themes') || !is_user_logged_in()){
wp_die('Maintenance, please come back soon.', 'Maintenance - please come back soon.', array('response' => '503'));
}
}
add_action('get_header', 'wp_maintenance_mode');
@whatadewitt
whatadewitt / app.js
Created January 18, 2012 00:38
My first go at sockets
var app = require('http').createServer(handler)
, io = require('socket.io').listen(app)
, fs = require('fs');
app.listen(1337);
function handler (req, res) {
fs.readFile(__dirname + '/index.html',
function (err, data) {
if (err) {