Display Travis and Appveyor badges on crates.io.
- I want to show the badges on an individual crate's page and on a list of crates.
- I only want to do 1 ajax request for the data (and only do 1 SQL query on the backend).
fn main() { | |
let z = 3; | |
let mut p = &z; | |
{ | |
let x = 5; | |
p = &x; | |
} | |
} |
fn main() { | |
let z = 3; | |
let r; | |
{ | |
let x = 5; | |
let mut p = &x; | |
p = &z; | |
r = p; | |
} |
modified: app/adapters/dependency.js | |
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
@ dependency.js:11 @ export default ApplicationAdapter.extend({ | |
delete query.reverse; | |
var { crate } = query; | |
delete query.crate; | |
- return this.ajax(`${this.urlPrefix()}/crates/${crate.get('id')}/reverse_dependencies`, | |
+ return this.ajax(`/${this.urlPrefix()}/crates/${crate.get('id')}/reverse_dependencies`, | |
'GET', { data: query }); | |
}, |
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.6.1 | |
-- Dumped by pg_dump version 9.6.1 | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET idle_in_transaction_session_timeout = 0; |
I gave this talk at Codemash 2017, and here are all the resources I mentioned during the talk!
<?xml version="1.0"?> | |
<doc> | |
<album> | |
<title>Thriller</title> | |
<artist>Michael Jackson</artist> | |
</album> | |
<book> | |
<title>Little Women</title> | |
<author>Louisa May Alcott</author> | |
</book> |
This was written a while ago for an internal work wiki, links may not work and recommendations may be dated. Also see this talk that Jake and I did about this topic!
The first rule of debugging is don't panic. Computers only do what you tell them to do. There should be nothing mysterious or magical about what your code is doing. There are many resources at your fingertips to be able to logically and definitively identify and fix a problem in your code.
The second rule of debugging is print. Even if you don't think there's any possibility that what's being processed at any point in time is different than what you think is being processed, print it out anyway. Print out values for your variables and inputs to your functions at various points in time.
Which brings us to the third rule of debugging-- narrow it down. If you print out values at 3 locations and the values at the 1st spot are what you expected but they're wrong at the 2nd, then you can elimi
$ make test | |
sh tests/check-style.sh | |
checking for lines over 100 characters... | |
ok | |
find $(git ls-files) -type f \ | |
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ | |
-not -name configure -not -name '*.sh' -not -name '*.rs' \ | |
-not -name '*.py' -not -wholename "*/rust-installer/*" | \ | |
grep '.*' \ | |
&& exit 1 || exit 0 |
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.6beta2 | |
-- Dumped by pg_dump version 9.6beta2 | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET idle_in_transaction_session_timeout = 0; |