rails new app_name -T
rvm --create --ruby-version use ruby-2.2.1@app_name
Gemfile
group :test do
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
wifi.setmode(wifi.STATION) | |
wifi.sta.config('YOUR_SSID','YOUR_SSID_PWD') | |
wifi.sta.connect() | |
tmr.alarm(1, 5000, 1, function() | |
if wifi.sta.getip()== nil then | |
print('IP unavaiable, waiting...') | |
else | |
tmr.stop(1) | |
print('IP is '..wifi.sta.getip()) |
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
Published slide deck | |
https://docs.google.com/presentation/d/12oIvAzltmQC2aDV39kn5DkaC3IxAiqbtbCTWfo40xso/pub?start=true&loop=true&delayms=3000 | |
Conway's game of life | |
http://en.wikipedia.org/wiki/Conway's_Game_of_Life | |
4 rules of simple design | |
http://www.slideshare.net/stevenbeeckman/4-simple-rules-of-design |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using TuesPechkin; | |
namespace SimpleHtmlToPdfConsole | |
{ | |
class Program |
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 BowlingCalc | |
attr_reader :score | |
def initialize | |
@score = 0 | |
end | |
def roll(pins) | |
@score += pins | |
end | |
end |
#Cursor movement
h - move left
j - move down
k - move up
l - move right
ctrl-b - page up
ctrl-f - page down
% - jump to matching brace
w - jump by start of words (punctuation considered words)
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
<script> | |
var app = angular.module('myApp', []); | |
var myController = app.controller('myController', ['$scope', function ($scope, $timeout) {}]); | |
myController.directive('chosen', function(){ | |
var linker = function(scope, element, attrs, ngModel) { | |
var model = attrs['ngModel']; | |
scope.$watch(model, function () { |
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
curl http://198.45.124.159/job/CSA_Report_Analytics_Tool/api/json | python -mjson.tool |
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
// PIN 1 is light bar power | |
// PIN 2 is red light on light bar | |
// PIN 3 is white driver side light | |
// PIN 4 is white passenger side light | |
// PIN 5 is blue light on light bar | |
// PIN 6 is marker lights | |
int led1 = 8; | |
int led2 = 9; | |
int led3 = 10; | |
int led4 = 11; |