Required tools for playing around with memory:
hexdump
objdump
readelf
xxd
gcore
/* | |
* ========================================================================================= | |
* Copyright © 2013-2018 the kamon project <http://kamon.io/> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the |
// Full-text/regexp search across the top 500 Rust crates: | |
// | |
// 1. Sign up for Sourcegraph.com at https://sourcegraph.com/sign-up (or sign in) | |
// 2. Click your username in the top right | |
// 3. Go to Configuration | |
// 4. Paste this entire JSON in and click Save | |
// 5. In the search box, type a search query of the form "repogroup:crates YOUR QUERY" | |
// and hit enter (regexps, exact matching, etc., are supported) | |
// | |
// Examples: "repogroup:crates remove_file" |
object Process { | |
type UserTime = Long | |
type KernelTime = Long | |
type StartTime = Long | |
//Hertz (number of clock ticks per second) of your system. | |
val Hz: Long = executeCmd("getconf CLK_TCK").map(_.toLong).getOrElse(100L) | |
/** |
Miles Sabin recently opened a pull request fixing the infamous SI-2712. First off, this is remarkable and, if merged, will make everyone's life enormously easier. This is a bug that a lot of people hit often without even realizing it, and they just assume that either they did something wrong or the compiler is broken in some weird way. It is especially common for users of scalaz or cats.
But that's not what I wanted to write about. What I want to write about is the exact semantics of Miles's fix, because it does impose some very specific assumptions about the way that type constructors work, and understanding those assumptions is the key to getting the most of it his fix.
For starters, here is the sort of thing that SI-2712 affects:
def foo[F[_], A](fa: F[A]): String = fa.toString
#!/bin/sh | |
# Configure homebrew permissions to allow multiple users on MAC OSX. | |
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine. | |
# allow admins to manage homebrew's local install directory | |
chgrp -R admin /usr/local | |
chmod -R g+w /usr/local | |
# allow admins to homebrew's local cache of formulae and source files | |
chgrp -R admin /Library/Caches/Homebrew |
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork [email protected] |