Skip to content

Instantly share code, notes, and snippets.

View eloquentJs_chapter2ex02.js
// FizzBuzz
for (var i = 0; i <= 100; i++){
var results = "";
if(i % 3 === 0) results += "Fizz";
if(i % 5 === 0) results += "Buzz";
console.log(results || i);
}
@sinapse1987
sinapse1987 / gist:75796bee967bc9494253
Last active Aug 25, 2015 — forked from ianbarber/gist:5170508
Example Sign In activity for Google+ Sign-In on Android
View gist:75796bee967bc9494253
package com.example.anothersignintest;
import java.io.IOException;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.android.gms.auth.UserRecoverableAuthException;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
@digizeph
digizeph / PlainGraph.java
Created Aug 25, 2015
Simple graph visualization using graphstream library.
View PlainGraph.java
package visualization;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.SingleGraph;
import java.util.Iterator;
public class PlainGraph {
public static void main(String args[]) {
View outline.md

Overview

Generating a story will all be piped through the architect. A system that essentially takes a cahracter/action tuple and outputs a narration that describes the event. The difference is, the architect will assign a positive or negative rating to the character/action tuple which can then be fed back into the character for learning. The character will determine whether this action was appropriate at the time and, given various environmental variables, will hopefully learn to make actions that advance the story.

Actors

All characters in the world will have the ability to invoke an action. Tentatively, these actions will include the following:

  • Use an Item
  • Drop an Item
  • Pick up an Item
  • Attack Another
  • Move about the World
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mjsxi
mjsxi / SassMeister-input.scss
Created Aug 25, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$small: nothing;
@mixin testSmall($s: null) {
@if ($s == nothing) {
display: none
} @else {
@JohanMoreau
JohanMoreau / updateDocker.sh
Created Aug 25, 2015
Docker 1.8 on Ubuntu box
View updateDocker.sh
sudo su
echo deb https://apt.dockerproject.org/repo ubuntu-`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d'=' -f2` main >> /etc/apt/sources.list.d/docker.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D
apt-get update
apt-get purge lxc-docker*
apt-get purge docker.io*
apt-get install docker-engine
exit
View layout.html
<nav-bar>
<dropdown class="visible-sm"></dropdown>
</nav-bar>
<side-bar class="col-md-3 hidden-sm">
<!--- elements of the menu -->
</side-bar>
<div class="container-fluid">
<div class="row">
<!-- the messages -->
View index.js
var React = require('react');
var ContentToggle = React.createClass({
render () {
return (
<div className="ContentToggle">
<div className="ContentToggle__Summary">{this.props.summary}</div>
<div className="ContentToggle__Details">Details</div>
</div>
);
}
@mjsxi
mjsxi / SassMeister-input.scss
Last active Aug 25, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
/* first test */
$small: nothing; // fallback for images not uploaded
@mixin testSmall($s: null) {
@if ($s == nothing) {