- Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
- rabl - General ruby templating with json, bson, xml, plist and msgpack support
- Thin - Very fast and lightweight Ruby web server
- Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
- SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
- Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
- [factory_girl](h
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
requests==2.4.3 | |
rsa==3.1.4 |
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
#include <opencv.hpp> | |
#include <vector> | |
#include <algorithm> | |
#include <cmath> | |
#include <ctime> | |
#include <string> | |
#include <iostream> | |
using namespace cv; | |
using namespace std; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
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
/* Our own header, to be included before all standard system headers */ | |
#ifndef _APUE_H | |
#define _APUE_H | |
#if defined(SOLARIS) | |
#define _XOPEN_SOURCE 500 /* Single UNIX Specification, Version 2 for Solaris 9 */ | |
#define CMSG_LEN(x) _CMSG_DATA_ALIGN(sizeof(struct cmsghdr)+(x)) | |
#elif !defined(BSD) | |
#define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */ |
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
/** | |
* determines whether a string is numeric | |
* LeetCode: http://oj.leetcode.com/problems/valid-number/ | |
*/ | |
class Solution { | |
public: | |
bool isSign(const char c) { | |
return c == '-' || c == '+'; | |
} |
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 Solution { | |
public: | |
bool isNumber(const char *s) { | |
if (!s) return false; | |
bool sign = true; bool num = false; | |
bool e = true; bool dot = true; int space = 0; | |
char c; | |
while (c=*s++) { | |
if (c != ' ' && space == 2) return false; |
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
#include <cstdio> | |
#include <queue> | |
#include <iostream> | |
#include <string> | |
#include <bitset> | |
using namespace std; | |
const int rows = 4, cols = 4; | |
const int max_num = 1<<(rows * cols); |
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
#include <cstdio> | |
#include <queue> | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <climits> | |
using namespace std; | |
const int rows = 4, cols = 5; |
OlderNewer