Skip to content

Instantly share code, notes, and snippets.

@wycks
wycks / wp-config.php
Last active September 26, 2015 07:27
Multi Environment wp-config.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@evancz
evancz / Architecture.md
Last active December 21, 2022 14:28
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible

Architecture in Elm

This document is a collection of concepts and strategies to make large Elm projects modular and extensible.

We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:

  1. There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
@jloescher
jloescher / wp-config.php
Last active August 29, 2015 14:04
Multi Environments | WP-Config.php
<?php
/** Absolute path to the WordPress directory. **/
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Define Environments **/
$environments = array(
'localhost' => 'localhost',
'development' => '',
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
html {
background-image: url(http://subtlepatterns.com/patterns/bo_play_pattern.png);
padding-top: 10px;
}
body {
padding-top: 15px;
padding-bottom: 20px;
}
#!/usr/bin/ruby
# dependencies:
# gem install sinatra
# gem install mechanize
#
# to run:
# from command line type: ruby substitutions.rb &
# and in your browser, go to: localhost:4567/http://some.random.site.com/
anonymous
anonymous / manifest.json
Created November 9, 2013 18:02
{
"name": "XKCD Text",
"version": "0.1",
"permissions": [
"http://*/*"
],
"content_scripts": [
{
"matches": ["http://*/*"],
"js": ["xkcdfy.js"],
@RangerMauve
RangerMauve / XKCD1288.user.js
Last active December 27, 2015 19:59
This is a filter I made that makes reading news more fun, I got the idea from http://xkcd.com/1288/. Since it's a userscript it should be easily install-able in Chrome or Firefox. In chrome it's as simple as downloading this file and dragging it into your "extensions" window.
// ==UserScript==
// @name FunNewsSubstitutions
// @namespace http://mauve.us.to
// @description This is a filter I made that makes reading news more fun, I got the idea from http://xkcd.com/1288/. Since it's a userscript it should be easily install-able in Chrome or Firefox
// @include *
// ==/UserScript==
// Wrapper to keep things in their own scope
(function(){
@jiaaro
jiaaro / sub.js
Last active December 27, 2015 18:48
v1 of implementing xkcd substituions: http://xkcd.com/1288/
function replace(txt) {
txt = txt.replace(/witnesses/gi, "dudes I know");
txt = txt.replace(/allegedly/gi, "kinda probably");
txt = txt.replace(/new study/gi, "tumblr post");
txt = txt.replace(/rebuild/gi, "avenge");
txt = txt.replace(/space/gi, "spaaace");
txt = txt.replace(/google glass/gi, "virtual boy");
txt = txt.replace(/smartphone/gi, "pokédex");
txt = txt.replace(/electric/gi, "atomic");
txt = txt.replace(/senator/gi, "elf-lord");