// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
var h = n * 747796405u + 2891336453u;
h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
return (h >> 22u) ^ h;
}
extends KinematicBody2D | |
export var move_speed = 200.0 | |
var velocity := Vector2.ZERO | |
export var jump_height : float | |
export var jump_time_to_peak : float | |
export var jump_time_to_descent : float |
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
"github.com/buildkite/cli/graphql" |
https://twitter.com/snookca/status/1073299331262889984?s=21
“In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”
Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows.
(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)
So the big deal about css-in-js (cij) is selectors.
# You're looking at it! :) | |
help: | |
@makehelp < $(MAKEFILE_LIST) | |
.PHONY: help |
Commits
- https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
- https://github.com/erlang/otp/wiki/writing-good-commit-messages
- http://who-t.blogspot.com.au/2009/12/on-commit-messages.html
- https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53
- https://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages
Note: this assumes you are using ZSH shell.
Install asdf:
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.0
$ echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc
$ echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
#!/bin/bash -eo pipefail | |
# Log in to Slack in a web browser and open the network tools to inspect the traffic. | |
# Filter the requests with "/api/" and pick one to inspect. | |
# You need the xoxc token from the request body, and a copy of the cookies. It is the "d" cookie that is important, but you can copy all of them. Make sure that the cookie value is percent encoded! | |
# Paste the values below. | |
# You need to have curl and jq installed. | |
# You can also get the xoxc token from localStorage. Run this in the JavaScript console: | |
# Object.entries(JSON.parse(localStorage.localConfig_v2)["teams"]).reduce((o,e) => Object.assign(o, { [e[1]["name"]]: e[1]["token"] }), {}) |
# Add this file to `spec/support/rails_log_splitter.rb` | |
require "stringio" | |
require "logger" | |
require "fileutils" | |
class RailsLogSplitter | |
def initialize(all: false) | |
@io = StringIO.new | |
@logger = Logger.new(@io) |