Skip to content

Instantly share code, notes, and snippets.

View carlosrivera's full-sized avatar

Carlos carlosrivera

View GitHub Profile
@carlosrivera
carlosrivera / Main.cpp
Created July 25, 2012 01:59
An ofuctaded pong game developed on C++
#include <cstdlib>
#include <windows.h>
#define _s_l33x(_3Ep0x033) Sl##_3Ep0x033
void __OxO___(short x0, short Ox){ COORD
__0x12o={x0,Ox};SetConsoleCursorPosition
(GetStdHandle((DWORD)-0x000b),__0x12o);}
#include <iostream>
void main(){{}short _________,_____=0x00013,____, __0x001__, __0x00l__;
_________=____=__0x001__=__0x00l__=0x01;_________ +=0x09;int __0x0__=0;
while(true){std::system("CLS");for(int i=0x00;i<39;std::cout<<"_",i++);
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity test3 is
port(clk50_in : in std_logic;
red_out : out std_logic;
green_out : out std_logic;
blue_out : out std_logic;
@carlosrivera
carlosrivera / gist:3173965
Created July 25, 2012 02:12
WindowsLive Messenger Agent
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Messenger;
namespace WindowsLiveMessengerAgent
{
public class MessengerAddIn
: IMessengerAddIn
{
#light
#I @"C:\Program Files\XNA\v2.0\References\Windows\x86"
#r "Microsoft.Xna.Framework.dll"
#r "Microsoft.Xna.Framework.Game.dll"
open Microsoft.Xna.Framework
open Microsoft.Xna.Framework.Graphics
open System
@carlosrivera
carlosrivera / gist:3174019
Created July 25, 2012 02:30
compile an execute a F# and XNA sample
@if "%_echo%"=="" echo off setlocal
..\..\..\bin\fsc.exe xna.fs
if ERRORLEVEL 1 goto Exit
:Exit
pause
xna.exe
endlocal
@carlosrivera
carlosrivera / gist:3764665
Created September 22, 2012 00:35
Sorting Algorithms in C++
#ifndef SORTINGALGORITHMS_H_
#define SORTINGALGORITHMS_H_
#endif /*SORTINGALGORITHMS_H_*/
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <stack>
#include <queue>
@carlosrivera
carlosrivera / README.rdoc
Created September 22, 2012 17:42 — forked from woodie/README.rdoc
Rails 2.3.5 on App Engine with DataMapper

Rails 2.3.5 on App Engine (DataMapper)

Do not use rvm (or install and run from JRuby). The google-appengine gem must install into your system MRI. The appengine-sdk gem includes a complete Java app server. We bootstrap Java from MRI, then your app runs inside a servlet container (with access to all the APIs) using the version of JRuby installed into each app.

We assumed Rails 2 would never work without rubygems, and we committed to gem bunlder for JRuby on App Engine, so we were waiting for Rails 3. Fortunately, Takeru Sasaki was able to patch the Rails 2.3.x calls to rubygems, and now we have it working. Rails 2.3.x currently spins up several seconds faster than Rails 3, and just a few seconds behind Sinatra.

See the TInyDS version also: gist.github.com/gists/269075

Install the Development Environment

@carlosrivera
carlosrivera / Usage.cs
Created September 27, 2012 06:45
XML ActionResult for ASM MVC
// ...
public class HomeController : Controller
{
public ActionResult Index()
{
return new XMLActionResult<MyClass>(
new MyClass
{
Data = "Hello, World!"
});
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Masonry 3 + Bootstrap</title>
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css">
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery.js"></script>
<?php # -*- coding: utf-8 -*-
/**
* Create a nav menu with very basic markup.
*
* @author Thomas Scholz http://toscho.de
* @version 1.0
*/
class T5_Nav_Menu_Walker_Simple extends Walker_Nav_Menu
{
/**