This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<div> | |
<input type='number' class='bottle-number' value='0'> | |
<button onclick="removeBottle()">Remove Bottles</button> | |
<button onclick="addBottle()">Add Bottles</button> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
class TypeError < StandardError; end | |
class TypeSafe | |
def self.typesafe_methods(*methods) | |
end | |
def self.typesafe(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jshint unused:true, esnext:true, expr:true | |
var Stack = React.createClass({ | |
getInitialState() { | |
return { | |
showProcess: false, | |
stackProgress: 0, | |
activeCell: [0,0], | |
functions: [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Our ScriptEd Class</title> | |
<style id="jsbin-css"> | |
body { | |
font-family: sans-serif; | |
} | |
p { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var thing = 'fun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn sort_vec(nums: &Vec<i32>) -> Vec<i32> { | |
let mut numbers = nums.clone(); | |
let mut greater_than = vec![]; | |
let mut less_than = vec![]; | |
if numbers.len() < 2 { | |
return numbers | |
} | |
let pivot = get_piv(numbers.pop()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
use std::ffi::OsStr; | |
use std::path::{self, Path, PathBuf}; | |
// fn get_expansion(file: &PathBuf) { | |
// | |
// } | |
struct Card { | |
name: String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'twitter' | |
require 'oauth' | |
require 'yaml' | |
require 'sequel' | |
module ShieldsUp | |
# hold the config keys and the DB info here. | |
CONFIG = YAML.load_file('config.yaml') | |
DB = Sequel.mysql( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
class LittleBits | |
def query_tags | |
@doc = Nokogiri::HTML(open("http://littlebits.cc")) | |
binding.pry | |
count = doc.search("//script").length | |
print "#{count} of <script/> tags on littlebits.cc homepage." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Timeline = React.createClass({ | |
// timeline component starts with no initial tweets/active tweet | |
getInitialState: function() { | |
return { tweets: [], activeTweet: {} }; | |
}, | |
// if called initially, loadTweets makes an Ajax call to the server for 20 tweets using the default | |
// hashtag "#gamergate" as the primary search parameter for the twitter client | |
// otherwise, the function gets called whenever the current number of tweets dips below 20 after removing a tweet |