Skip to content

Instantly share code, notes, and snippets.

View bonekost's full-sized avatar
🧨

Martin bonekost

🧨
View GitHub Profile
@bonekost
bonekost / Gruntfile.js
Created March 3, 2017 20:06 — forked from fervisa/Gruntfile.js
Gruntfile to process Angular/Ionic sass, coffee, haml files into css, js, html
/* Gruntfile.js
* Grunt workflow for building AngularJS/Ionic applications.
*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
compile: {
@bonekost
bonekost / index.md
Created December 5, 2016 08:15 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@bonekost
bonekost / Rspec.md
Created December 2, 2016 23:52 — forked from stevenyap/Rspec.md
Rspec testing cheatsheet

Precaution

  • Example groups are executed in random orders so setting let must be taken care of
  • before(:all) does not rollback transaction! Test data created remains in the test database! However, running rspec (on cmd line) will clear the test database.
    rake db:test:prepare will also clear the test database.

Testing samples:

Feature testing:

@bonekost
bonekost / readme.md
Created November 9, 2016 20:43 — forked from maxivak/readme.md
Integrating Gem/Engine and Main Rails App
@bonekost
bonekost / rpc.gd
Created May 19, 2016 14:17 — forked from bibby/rpc.gd
Godot HTTPClient usage
## rpc.gd
# An experiment in using HTTPClient
# for blocking RPCs
# @author bibby<[email protected]>
#
# get( url )
# post( url, body )
# put( url, body )
# delete( url )
@bonekost
bonekost / DHT11_BMP180_server.ino
Created March 13, 2016 14:38 — forked from attilaolah/DHT11_BMP180_server.ino
HTTP JSON API: ENC28J60 + DHT11 + BMP180 + UNO
// HTTP JSON API.
#include <EtherCard.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_BMP085_U.h>
// Ethernet: