https://jira.dev.bbc.co.uk/browse/NEWS-0000
- #0000
git checkout another | |
git rebase side | |
git rebase bugFix | |
git rebase master | |
git checkout master | |
git rebase another |
# Ad-hoc | |
xrandr --newmode 1920x1080 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync | |
xrandr --addmode VBOX0 1920x1080 | |
xrandr --output VBOX0 --mode 1920x1080 | |
# Or in ~/.i3/config | |
# exec_always xrandr --newmode 1920x1080 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync | |
# exec_always xrandr --addmode VBOX0 1920x1080 | |
# exec_always xrandr --output VBOX0 --mode 1920x1080 |
sleep_times=('4' '1' '2' '5' '0') | |
pids=() | |
for sleep_time in ${sleep_times[@]} | |
do | |
sleep $sleep_time & | |
pids=(${pids[@]} $!) | |
done | |
for pid in ${pids[@]} |
<?php | |
/** | |
* Recursively search an array for a given value. Returns the root element key if $needle | |
* is found, or FALSE if $needle cannot be found. | |
* | |
* @param mixed $needle | |
* @param array $haystack | |
* @param bool $strict | |
* @return mixed|bool |
var page = require('webpage').create() | |
var system = require('system') | |
if (system.args.length === 1) { | |
console.log('Usage: morph-style-checker.js <URL>') | |
phantom.exit(1) | |
} | |
var url = system.args[1] |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
const hydrateComponent = (scriptEl) => { | |
const componentId = scriptEl.getAttribute('data-hydration-data-id') | |
const componentElement = document.querySelector(`[data-hydration-component-id="${componentId}"]`) | |
const props = JSON.parse(scriptEl.innerHTML) | |
import(componentId).then(Component => ReactDOM.render(<Component {...props} />, componentElement)) | |
} |
// Paste this into https://preactjs.com/repl to see it working | |
// This function takes any component, and returns a higher-order (wrapper) | |
// component. This wrapper attempts to render the wrapped component, catching | |
// any errors. | |
const safeComponent = (Component) => function WrappedComponent () { | |
// Handle both class components and stateless functional components | |
const wrappedRender = Component.prototype.render || Component | |
try { |
<?php | |
require_once 'ControllerTestCase.php'; | |
class AccountControllerTest extends ControllerTestCase | |
{ | |
public function testSignupWithNoDataRedirectsAndHasErrors() | |
{ | |
$response = $this->post('account@signup', array()); |
{ | |
"theme": "Soda Dark.sublime-theme", | |
"color_scheme": "Packages/Theme - Refined/Color Schemes/Monokai Refined.tmTheme", | |
"font_face": "Droid Sans Mono", | |
"font_size": 12, | |
"font_options": ["no_italic"], | |
"highlight_line": true, | |
"line_padding_top": 3, | |
"line_padding_bottom": 3, |