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
<?php | |
class UsersController extends AppController | |
{ | |
function index() | |
{ | |
$userName = $this->Session->read('User.username'); | |
if($userName == null){ | |
$this->redirect(array('controller' => 'users', 'action' => 'login')); | |
} |
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
<?php | |
class CompaniesController extends AppController { | |
function index(){ | |
$companies = $this->Company->find('all', array('limit' => 10)); | |
$this->set('companies', $companies); | |
$this->loadModel('Category'); | |
$categories = $this->Category->find('all'); | |
$this->set('categories', $categories); |
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 gulp = require('gulp'); | |
gulp.task('default', function(){ | |
var watcher = gulp.watch('*.txt'); | |
watcher.on('change', function(event){ | |
console.log('Something happened: ', event); | |
}); | |
}); |
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> | |
<head> | |
<script src="//fb.me/react-0.9.0.js"></script> | |
<meta charset="utf-8"> | |
<title>Little code lock in React.js</title> | |
</head> | |
<body> | |
<script> |
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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Another React.js experiment (with JSX)</title> | |
<script src="http://fb.me/react-with-addons-0.10.0.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.10.0.js"></script> | |
</head> |
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
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq": | |
mode: "000777" | |
owner: root | |
group: root | |
content: | | |
cd /var/app/current | |
mkdir -p /var/app/current/tmp/pids | |
mkdir -p /var/app/current/tmp/logs |
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 <SPI.h> | |
// define pins and other variables | |
const int latchPin = 8; | |
const int clockPin = 13; | |
const int dataPin = 11; | |
// setup the correct pins and initialize SPI library | |
void setup() { | |
// setup pins |
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
FROM node:0.12 | |
# replace this with your application's default port | |
EXPOSE 4000 | |
RUN mkdir /src | |
VOLUME /src | |
WORKDIR /src | |
CMD ["npm", "install"] |
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 <SPI.h> | |
// define pins and other variables | |
const int latchPin = 8; | |
const int clockPin = 13; | |
const int dataPin = 11; | |
const int NUMBER_OF_CONNECTED_LEDS = 16; | |
// global array that keeps track of the LEDs brightnesses | |
bool brightnessMask[NUMBER_OF_CONNECTED_LEDS*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 <SPI.h> | |
// define pins and other variables | |
const int latchPin = 8; | |
const int clockPin = 13; | |
const int dataPin = 11; | |
const int NUMBER_OF_CONNECTED_LEDS = 16; | |
// global array that keeps track of the LEDs brightnesses | |
bool brightnessMask[NUMBER_OF_CONNECTED_LEDS*4]; |
OlderNewer