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 base = this; | |
if ( !base.init ) { | |
// Mark that we've ran the init code | |
base.init = true; | |
// Starting frame number | |
base.frames = 0; | |
// Amount of frames per second |
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
# Add this to your application.rb | |
config.middleware.use Rack::Cors do | |
allow do | |
origins '*' | |
# location of your API | |
resource '/api/*', :headers => :any, :methods => [:get, :post, :options, :put] | |
end | |
end |
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
/* | |
* Firmata is a generic protocol for communicating with microcontrollers | |
* from software on a host computer. It is intended to work with | |
* any host computer software package. | |
* | |
* To download a host software package, please clink on the following link | |
* to open the download page in your default browser. | |
* | |
* http://firmata.org/wiki/Download | |
*/ |
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
#!/bin/bash | |
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
echo "Added!" | |
free -m |
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
# Chinese (China) translations for Devise(3.5.2) | |
# by Kenrick-Zhou (https://github.com/Kenrick-Zhou) | |
# https://gist.github.com/Kenrick-Zhou/7909822 | |
zh-CN: | |
devise: | |
confirmations: | |
confirmed: "您的帐号已经确认,您现在已登录。" | |
send_instructions: "几分钟后,您将收到确认帐号的电子邮件。" | |
send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。" |
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
// constants ------------------------------------------------------------------- | |
var alliedTypes = { | |
peasant: 'peasant', | |
soldier: 'soldier', | |
knight: 'knight', | |
librarian: 'librarian', | |
griffinRider: 'griffin-rider', | |
captain: 'captain' | |
}; |
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 express = require('express'); | |
var bodyParser = require('body-parser') | |
var crypto = require('crypto'); | |
// Calculate the X-Hub-Signature header value. | |
function getSignature(buf) { | |
var hmac = crypto.createHmac("sha1", process.env.FB_APP_SECRET); | |
hmac.update(buf, "utf-8"); | |
return "sha1=" + hmac.digest("hex"); | |
} |
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
<VirtualHost *:80> | |
ServerAdmin {USER}@cslavoie.com | |
ServerName {DOMAIN} | |
ServerAlias www.{DOMAIN} | |
ServerAlias {USER}.localhost | |
ServerAlias {USER}.static.cslavoie.com | |
DocumentRoot {DOC_ROOT} | |
<Directory {DOC_ROOT}> |
OlderNewer