Skip to content

Instantly share code, notes, and snippets.

View coopy's full-sized avatar

Per Nilsson coopy

View GitHub Profile
@coopy
coopy / posted more
Created August 3, 2013 17:43
more posted desc
some more posted body
@coopy
coopy / gist:6147160
Created August 3, 2013 17:13
YahGist
Yah
mygist1
@coopy
coopy / posted
Created August 3, 2013 17:26
posted desc
posted body
@coopy
coopy / posted more 2
Created August 4, 2013 05:03
more posted desc
some more posted body
@coopy
coopy / posted more 2
Created August 4, 2013 05:07
more posted desc - edited
some more posted body
@coopy
coopy / gist:169fc59bcad9f86ac369
Created February 29, 2016 22:56
Managed React input
const Form = React.createClass({
// keeps state and re-renders <Input/> when `handleChange` is called back.
});
const Input = ({ inputValue, handleChange }) => {
return (
<input value={inputValue} onChange={(ev) => {handleChange(ev.target.value)}}
);
}
UPDATE wp_options SET option_value = replace(option_value, 'http://old.com', 'http://localhost:8888') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.com', 'http://localhost:8888');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old.com', 'http://localhost:8888');
'use strict'
const WIDTH = 800
const HEIGHT = 600
const SIXTY_FPS_DELAY = 1000 / 60
function createContext () {
const canvas = document.getElementById('canvas')
canvas.width = WIDTH
canvas.height = HEIGHT
javascript: (function () {
var content = document.querySelectorAll('.article__premium-content')[0];
var intro = document.querySelectorAll('.article__lead')[0];
var payWall = document.querySelectorAll('#serviceplusPaywallpaywall-container')[0];
var social = document.querySelectorAll('.js-social-toolbar')[0];
var ghost = document.querySelectorAll('.article__body--mask .article__lead')[0];
intro.style.overflow = "visible";
content.style.display = "block";
payWall.style.display = "none";