- Create
hotfix-branch
fromrelease
- Commit to
hotfix-branch
- Merge
hotfix-branch
into bothrelease
anddevelop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Generate an ED25519 key and display the public key | |
ssh-keygen -o -a 100 -t ed25519 | |
cat ~/.ssh/id_ed25519.pub | |
read -p 'You should add your public key to GitHub now. Press any key to continue...' | |
read -p 'Now you will generate a GPG key. Please use RSA/RSA with a keysize of 4096 bits. Press any key to continue...' | |
gpg --default-new-key-algo rsa4096 --gen-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fuck the addition operator. Real programmers work in binary! | |
function add(a, b) { | |
// XOR to get the sum of the bits | |
var sum = a ^ b; | |
// "Carry" bits are common to both numbers | |
var carry = (a & b) << 1; | |
if (sum & carry) { | |
// Rinse and repeat until there are no leftover bits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Queue = function() { | |
var isInit = false; | |
var queue = []; | |
return { | |
onInit: function(callback) { | |
if (isInit) { | |
callback(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Event = function() { | |
var self = this; | |
self.queue = {}; | |
self.fired = []; | |
return { | |
fire: function(event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'ControllerTestCase.php'; | |
class AccountControllerTest extends ControllerTestCase | |
{ | |
public function testSignupWithNoDataRedirectsAndHasErrors() | |
{ | |
$response = $this->post('account@signup', array()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
NewerOlder