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
/* | |
Used when you need a JSON feed from your other domain. Need a | |
Content-type of application/json, so be sure to use the correct | |
HTTP header in your app (at the other domain). | |
*/ | |
// blabla just don't forget jQuery | |
$.ajax({ | |
url: "another domain generating a JSON", |
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
{ | |
hardy: { | |
increase: "none", | |
decrease: "none" | |
}, | |
docile: { | |
increase: "none", | |
decrease: "none" | |
}, | |
serious: { |
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 lang="en"> | |
<head> | |
<title>Pokémon Buttons for each type</title> | |
<link rel="stylesheet" type="text/css" href="./types.css" /> | |
</head> | |
<body> | |
<div class='container'> | |
<span class="type normal left">normal</span> |
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
{ | |
"normal": { | |
"normal": 1, | |
"fire": 1, | |
"water": 1, | |
"electric": 1, | |
"grass": 1, | |
"ice": 1, | |
"fighting": 1, | |
"poison": 1, |
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
<ul class="post-list unstyled"> | |
{% for post in site.posts %} | |
{% capture post_year %} | |
{{ post.date | date: "%Y" }} | |
{% endcapture %} | |
{% unless year == post_year %} | |
{% assign year = post_year %} | |
<h1>{{ year }}</h1> |
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
with Ada.Text_IO; | |
with Ada.Float_Text_IO; | |
with Ada.Numerics.Float_Random; | |
use Ada.Text_IO; | |
use Ada.Float_Text_IO; | |
use Ada.Numerics.Float_Random; | |
procedure Pi is | |
N: constant Integer := 500000; -- Number of iterations. |
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
class Pokemon | |
def battle | |
yield self | |
end | |
end | |
mewtwo = Pokemon.new | |
mewtwo.battle do |m2| | |
puts m2 |
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
#------------------------------------------------------------------------------ | |
# QuotesGenerator | |
# A Jekyll plugin to generate a quotes/index.html page based on a Tumblr's | |
# account. | |
# | |
# You need a quotes.json file inside a SITE_ROOT/_data/ directory to use this | |
# plugin. It must use the same format as Tumblr's API v2. | |
# | |
# Available _config.yml settings: | |
# - text_size_limit: Maximum size of a used quote. Default to 1000. |
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 | |
# | |
# This script creates checkerboard inputs for CS325 Program #4. | |
# | |
# Carlos Agarie | |
# | |
prng = Random.new | |
# Arbitrarily decided that 80% are checkers and 20% are kings. |
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
$ rake compile | |
rake/gempackagetask is deprecated. Use rubygems/package_task instead | |
mkdir -p tmp/x86_64-darwin11.4.0/nmatrix/1.9.3 | |
cd tmp/x86_64-darwin11.4.0/nmatrix/1.9.3 | |
/Users/carlosagarie/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -I. ../../../../ext/nmatrix/extconf.rb | |
checking for clapack_dgetrf() in -llapack... no | |
checking for clapack.h... no | |
checking for cblas_dgemm() in -lcblas... yes | |
checking for ATL_dgemmNN() in -latlas... yes | |
checking for cblas.h... no |
OlderNewer