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
# Ruby's inheritance mechanisms are a bit unique and have some subtelties | |
# There are two main ways to inherit: Direct Inheritance (with a "Base" class) and "Mixins" (including modules) | |
# "Direct inheritance" (B is the base class of A) | |
class B | |
X = 30 | |
def self.static_method | |
"Hello from static method" | |
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
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'pry' | |
gem "sqlite3" | |
gem 'activerecord' | |
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
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
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
/** | |
* Apply custom middlewares to request | |
* Usage: | |
* 1- Identify that you require dynamic middlewares for your endpoint. | |
* 2- assign each middleware to a variable and push it to an array | |
* const middlewares = [middleware1, middlware2]; | |
* 3- require this file with expected objects. | |
* | |
* Example: | |
* const middleware1 = require('some middleware file here'); |
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
# Load DSL and set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
require 'capistrano/rvm' | |
# Load custom tasks from `lib/capistrano/tasks' if you have any defined | |
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
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
{ | |
"name": "update name", | |
"version": "0.0.1", | |
"description": "A nice app", | |
"repository": "", | |
"author": "your name", | |
"main": "js/app.js", | |
"dependencies": { | |
"backbone": "^1.1.2", | |
"flux": "^2.0.1", |
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
.audio { | |
position: relative; | |
} | |
.audio > canvas { | |
position: absolute; | |
top: 0; | |
left: 0; | |
pointer-events: none; | |
} | |
.audio-play { |
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> | |
<body> | |
<script> | |
var gui = require('nw.gui'); | |
function supportExternalLinks(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
/** | |
* Namespace to run some componnents of the API | |
* @ref http://jebchit.info/pr/browse.php/Oi8vamFr/ZWpzLmNv/bS9kb2Nz/b5/ | |
* @return {Object} | |
*/ | |
namespace('tests', function() { | |
var Mocha = require('mocha'), | |
fs = require('fs'), | |
mocha, runTests; |