Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
@carols10cents
carols10cents / playground.rs
Created February 16, 2017 02:55 — forked from anonymous/playground.rs
to break your brain again
fn main() {
let z = 3;
let mut p = &z;
{
let x = 5;
p = &x;
}
}
@carols10cents
carols10cents / playground.rs
Last active February 16, 2017 02:52 — forked from anonymous/playground.rs
to break your brain with
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;

Ember: IDK What I Am Doing

Goal

Display Travis and Appveyor badges on crates.io.

Considerations

  • 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).
@carols10cents
carols10cents / reading-list.md
Last active January 7, 2017 02:32
"How to disclose a security vulnerability" Reading List

"How to disclose a security vulnerability" Reading List

I gave this talk at Codemash 2017, and here are all the resources I mentioned during the talk!

Todo List

  1. Make a keypair - instructions at PGP and You
  2. Share it via Keybase or a key server so people can verify it belongs to you
  3. Send encrypted emails to a friend for practice. Once you have gpg2 installed:
<?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>
@carols10cents
carols10cents / debugging.md
Last active October 5, 2016 14:20
My treatise on debugging

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!

Debugging

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

@carols10cents
carols10cents / output
Last active September 11, 2016 18:58
Test output when using rustup.rs and running cargo's tests
$ 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;