Skip to content

Instantly share code, notes, and snippets.

Avatar

Jared Forsyth jaredly

View GitHub Profile
@jaredly
jaredly / Perceptron.ipynb
Created Jan 30, 2014
Submission Perceptron Notebook
View Perceptron.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaredly
jaredly / neovim-variations-on-L.svg
Created Feb 25, 2014
Variations on my neovim #L
View neovim-variations-on-L.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am jaredly on github.
  • I am jaredly (https://keybase.io/jaredly) on keybase.
  • I have a public key whose fingerprint is 8F30 2819 1F60 3454 D682 FA0E 715D 5E7A 6D0E C90A

To claim this, I am signing this object:

View ex.jsx
var rows = [];
for (var i=0; i<items.length; i+=2){
rows.push(<div className="parent-row">
<div className="parent-card">
{items[i]}
</div>
<div className="parent-card">
{items[i+1]}
View gist:8fc3195038e606411777
var MyMixin = require('my-mixin')
// way one
var App = React.createClass({
mixins: [MyMixin],
stuffForMyMixin: {
aVariable: 12,
@jaredly
jaredly / Document.nm
Last active Aug 29, 2015
Playing in the JS Sandbox
View Document.nm
{
"created": 1416954835215,
"modified": 1416954835215,
"content": "Playing in the JS Sandbox",
"children": [
{
"content": "Notification API",
"children": [
{
"content": "var notification = new Notification(\"Execution Finished\", {\n body: \"Time taken: 20:00\"\n})",
@jaredly
jaredly / compilecompile.rs
Created Nov 18, 2014
simple example of compiling rust
View compilecompile.rs
extern crate rustc;
extern crate syntax;
use rustc::driver::config::{basic_options, build_configuration};
use rustc::driver::session::{build_session};
use rustc::driver::driver::{StrInput, compile_input};
use syntax::diagnostics;
fn main() {
let src = "fn main() {println!(\"Awesome\");}";
@jaredly
jaredly / ex.rs
Created Nov 19, 2014
failing to be sized?
View ex.rs
trait A {
fn one(&self);
}
trait B {
fn two(&self);
}
/** Dies because it wants the "Sized" trait
View gist:fec82bd2bea8b497b1b3
#[deriving(Clone)]
#[deriving(Decodable, Encodable)]
#[deriving(Show)]
struct DoneCompiled {
compileError: String,
stdout: String,
stderr: String,
}
@jaredly
jaredly / mem.rs
Last active Aug 29, 2015
Rust Optimization Opportunity
View mem.rs
use std::kinds::marker::NoCopy;
struct WillMove {
boxed: NoCopy,
large: [uint, ..100000],
}
/*******************************/
/** VARIANT 1 : with movement **/